[rubygem-bundler] Properly uninstall the vendor directory.

Vít Ondruch vondruch at fedoraproject.org
Thu Feb 5 15:10:00 UTC 2015


commit 5ca32d2c71cc1bb9225ab8a25fdae3d522ae4202
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Thu Feb 5 16:09:49 2015 +0100

    Properly uninstall the vendor directory.

 rubygem-bundler.spec |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/rubygem-bundler.spec b/rubygem-bundler.spec
index 1f57e8c..0207ef3 100644
--- a/rubygem-bundler.spec
+++ b/rubygem-bundler.spec
@@ -11,14 +11,14 @@ do \
   for fileordir in \\\
     %{gem_dir}/gems/$dependency-*/lib/* \
   do \
-    ln -s -f $fileordir %{gem_libdir}/bundler/vendor/$(basename "$fileordir") \
+    ln -s -f $fileordir -t %{gem_libdir}/bundler/vendor/ \
   done \
 done
 
 Summary: Library and utilities to manage a Ruby application's gem dependencies
 Name: rubygem-%{gem_name}
 Version: 1.7.8
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: Development/Languages
 License: MIT
 URL: http://gembundler.com
@@ -125,10 +125,6 @@ rspec spec
 # See rhbz#1163039
 %symlink_vendored_libs
 
-%postun
-# Remove the symlinks for vendored libs after uninstallation
-rm -f %{gem_libdir}/bundler/vendor/*
-
 %triggerpostun -- rubygem-thor, rubygem-net-http-persistent
 # We need to recreate the symlinks after the old package of vendored lib
 # has been removed, not before
@@ -139,6 +135,9 @@ rm -f %{gem_libdir}/bundler/vendor/*
 %exclude %{gem_instdir}/.*
 %exclude %{gem_instdir}/man
 %{gem_libdir}
+%ghost %attr(644, root, root) %{gem_libdir}/bundler/vendor/net
+%ghost %attr(644, root, root) %{gem_libdir}/bundler/vendor/thor
+%ghost %attr(644, root, root) %{gem_libdir}/bundler/vendor/thor.rb
 %exclude %{gem_libdir}/bundler/ssl_certs/.document
 %exclude %{gem_libdir}/bundler/ssl_certs/*.pem
 %doc %{gem_instdir}/LICENSE.md
@@ -164,6 +163,9 @@ rm -f %{gem_libdir}/bundler/vendor/*
 %doc %{gem_docdir}
 
 %changelog
+* Thu Feb 05 2015 Vít Ondruch <vondruch at redhat.com> - 1.7.8-2
+- Properly uninstall the vendor directory.
+
 * Tue Dec 09 2014 Vít Ondruch <vondruch at redhat.com> - 1.7.8-1
 - Update to Bundler 1.7.8.
 


More information about the scm-commits mailing list