[pax] spec: remove /usr/bin/pax if it is executable binary

Pavel Raiskup praiskup at fedoraproject.org
Thu Jun 6 10:41:49 UTC 2013


commit 9290f38ea0b4af76d4893845890fec7034de0471
Author: Pavel Raiskup <praiskup at redhat.com>
Date:   Thu Jun 6 12:33:00 2013 +0200

    spec: remove /usr/bin/pax if it is executable binary
    
    Related: #929349
    Version: 3.4-17

 pax.spec |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/pax.spec b/pax.spec
index cba2dc5..40eb5ff 100644
--- a/pax.spec
+++ b/pax.spec
@@ -3,7 +3,7 @@
 Summary: POSIX File System Archiver
 Name: pax
 Version: 3.4
-Release: 16%{?dist}
+Release: 17%{?dist}
 License: BSD
 Group: Applications/Archiving
 Source: ftp://ftp.suse.com/pub/people/kukuk/pax/%{name}-%{version}.tar.bz2
@@ -74,6 +74,11 @@ rm -rf %{buildroot}
 %ghost %verify(not md5 size mode mtime) %{ALT_SL1_LINK}
 
 %post
+# We need to remove old /usr/bin/pax binary because the following
+# 'update-alternatives' step does not do it itself.  We may remove this once we
+# are sure that pax >= 3.4-16 is installed on the system.
+test -f %{ALT_LINK} && test ! -h %{ALT_LINK} && rm -rf %{ALT_LINK}
+
 %{ALTERNATIVES} \
     --install   %{ALT_LINK}     %{ALT_NAME}     %{ALT_PATH}     33 \
     --slave     %{ALT_SL1_LINK} %{ALT_SL1_NAME} %{ALT_SL1_PATH} \
@@ -85,6 +90,9 @@ if [ $1 -eq 0 ]; then
 fi
 
 %changelog
+* Thu Jun 06 2013 Pavel Raiskup <praiskup at redhat.com> - 3.4-17
+- remove old %%{_bindir}/pax binary if existent during update
+
 * Wed May 15 2013 Pavel Raiskup <praiskup at redhat.com> - 3.4-16
 - setup the 'alternatives' template (#929349)
 


More information about the scm-commits mailing list