packages: obsoleted/obsoleted.spec - use shell builtins, perhaps easier for...
glen
glen at pld-linux.org
Tue Feb 2 16:23:18 CET 2010
Author: glen Date: Tue Feb 2 15:23:18 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- use shell builtins, perhaps easier for eyes
---- Files affected:
packages/obsoleted:
obsoleted.spec (1.3 -> 1.4)
---- Diffs:
================================================================
Index: packages/obsoleted/obsoleted.spec
diff -u packages/obsoleted/obsoleted.spec:1.3 packages/obsoleted/obsoleted.spec:1.4
--- packages/obsoleted/obsoleted.spec:1.3 Tue Feb 2 16:15:54 2010
+++ packages/obsoleted/obsoleted.spec Tue Feb 2 16:23:13 2010
@@ -18,9 +18,9 @@
This package sole purpose is to provide upgrade to new names of
obsoleted packages.
-%define PkgN(n:) %(set -x;NVR=%{-n*}; IFS=-;set -- $NVR; V=$(eval echo \"\\$$(($#-1))\"); R=$(eval echo \"\\$$(($#-0))\"); unset IFS; echo ${NVR%%-$V-$R})
-%define PkgV(n:) %(set -x;NVR=%{-n*}; IFS=-;set -- $NVR; eval echo \"\\$$(($#-1))\")
-%define PkgR(n:) %(set -x;NVR=%{-n*}; IFS=-;set -- $NVR; eval echo \"\\$$#\")
+%define PkgN(n:) %(NVR=%{-n*}; NV=${NVR%%-*}; N=${NV%%-*}; VR=${NVR#$N-}; V=${VR%%-*}; R=${VR#*-}; echo $N)
+%define PkgV(n:) %(NVR=%{-n*}; NV=${NVR%%-*}; N=${NV%%-*}; VR=${NVR#$N-}; V=${VR%%-*}; R=${VR#*-}; echo $V)
+%define PkgR(n:) %(NVR=%{-n*}; NV=${NVR%%-*}; N=${NV%%-*}; VR=${NVR#$N-}; V=${VR%%-*}; R=${VR#*-}; echo $R)
%define migrate() \
%package -n %{PkgN -n %1} \
@@ -65,6 +65,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.4 2010/02/02 15:23:13 glen
+- use shell builtins, perhaps easier for eyes
+
Revision 1.3 2010/02/02 15:15:54 glen
- handle subpackages
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/obsoleted/obsoleted.spec?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list