fedora-rpmdevtools rpmdev-vercmp, 1.1, 1.2 rpmdevtools.spec, 1.27, 1.28
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Wed Jun 27 17:09:39 UTC 2007
- Previous message: rpms/binutils/devel binutils-2.17.50.0.17-build-fixes.patch, NONE, 1.1 binutils-2.17.50.0.17-ia64-lib64.patch, NONE, 1.1 binutils-2.17.50.0.17-ltconfig-multilib.patch, NONE, 1.1 binutils-2.17.50.0.17-place-orphan.patch, NONE, 1.1 binutils-2.17.50.0.17-ppc64-pie.patch, NONE, 1.1 binutils-2.17.50.0.17-standards.patch, NONE, 1.1 binutils-2.17.50.0.17-symbolic-envvar-revert.patch, NONE, 1.1 binutils-2.17.50.0.17-version.patch, NONE, 1.1 .cvsignore, 1.33, 1.34 binutils.spec, 1.116, 1.117 sources, 1.34, 1.35 binutils-2.17.50.0.16-build-fixes.patch, 1.1, NONE binutils-2.17.50.0.16-ia64-lib64.patch, 1.1, NONE binutils-2.17.50.0.16-ltconfig-multilib.patch, 1.1, NONE binutils-2.17.50.0.16-place-orphan.patch, 1.1, NONE binutils-2.17.50.0.16-ppc64-pie.patch, 1.1, NONE binutils-2.17.50.0.16-standards.patch, 1.1, NONE binutils-2.17.50.0.16-symbolic-envvar-revert.patch, 1.1, NONE binutils-2.17.50.0.16-version.patch, 1.1, NONE
- Next message: rpms/cmake/devel cmake.spec,1.17,1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: scop
Update of /cvs/fedora/fedora-rpmdevtools
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20620
Modified Files:
rpmdev-vercmp rpmdevtools.spec
Log Message:
Add 2-argument form for comparing EVR strings to rpmdev-vercmp.
Index: rpmdev-vercmp
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/rpmdev-vercmp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- rpmdev-vercmp 20 Aug 2006 15:40:44 -0000 1.1
+++ rpmdev-vercmp 27 Jun 2007 17:09:36 -0000 1.2
@@ -5,11 +5,19 @@
import rpm
import sys
+have_miscutils = 0
+try:
+ from rpmUtils.miscutils import stringToVersion
+ have_miscutils = 1
+except:
+ pass
+
def usage():
print """
- rpmdev-vercmp epoch1, ver1, release1, epoch2, ver2, release2
- or just let it ask you.
- """
+rpmdev-vercmp <epoch1> <ver1> <release1> <epoch2> <ver2> <release2>
+rpmdev-vercmp <EVR1> <EVR2> # if rpmUtils.miscutils is available
+rpmdev-vercmp # with no arguments, prompt
+"""
def vercmp((e1, v1, r1), (e2, v2, r2)):
rc = rpm.labelCompare((e1, v1, r1), (e2, v2, r2))
@@ -24,6 +32,16 @@
if len(sys.argv) > 1 and sys.argv[1] in ['-h', '--help', '-help', '--usage']:
usage()
sys.exit(0)
+ elif len(sys.argv) == 3:
+ if have_miscutils:
+ (e1, v1, r1) = stringToVersion(sys.argv[1])
+ (e2, v2, r2) = stringToVersion(sys.argv[2])
+ else:
+ print """
+Sorry, the 2-argument form is available only if rpmUtils.miscutils (which
+ships eg. with yum) is available."""
+ usage()
+ sys.exit(1)
elif len(sys.argv) < 7:
e1 = askforstuff('Epoch1')
v1 = askforstuff('Version1')
@@ -38,15 +56,9 @@
if rc > 0:
print "%s:%s-%s is newer" % (e1, v1, r1)
elif rc == 0:
- print "These are Equal"
+ print "These are equal"
elif rc < 0:
print "%s:%s-%s is newer" % (e2, v2, r2)
if __name__ == "__main__":
main()
-
-
-
-
-
-
Index: rpmdevtools.spec
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/rpmdevtools.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- rpmdevtools.spec 16 Jun 2007 21:21:26 -0000 1.27
+++ rpmdevtools.spec 27 Jun 2007 17:09:36 -0000 1.28
@@ -100,6 +100,10 @@
%changelog
+* Wed Jun 27 2007 Ville Skyttä <ville.skytta at iki.fi>
+- Add 2-argument form for comparing EVR strings to rpmdev-vercmp
+ (available only if rpmUtils.miscutils is available).
+
* Sat Jun 16 2007 Ville Skyttä <ville.skytta at iki.fi>
- Include rpmsodiff and dependencies (rpmargs, rpmelfsym, rpmfile, rpmpeek,
rpmsoname) from ALT Linux's qa-robot package.
- Previous message: rpms/binutils/devel binutils-2.17.50.0.17-build-fixes.patch, NONE, 1.1 binutils-2.17.50.0.17-ia64-lib64.patch, NONE, 1.1 binutils-2.17.50.0.17-ltconfig-multilib.patch, NONE, 1.1 binutils-2.17.50.0.17-place-orphan.patch, NONE, 1.1 binutils-2.17.50.0.17-ppc64-pie.patch, NONE, 1.1 binutils-2.17.50.0.17-standards.patch, NONE, 1.1 binutils-2.17.50.0.17-symbolic-envvar-revert.patch, NONE, 1.1 binutils-2.17.50.0.17-version.patch, NONE, 1.1 .cvsignore, 1.33, 1.34 binutils.spec, 1.116, 1.117 sources, 1.34, 1.35 binutils-2.17.50.0.16-build-fixes.patch, 1.1, NONE binutils-2.17.50.0.16-ia64-lib64.patch, 1.1, NONE binutils-2.17.50.0.16-ltconfig-multilib.patch, 1.1, NONE binutils-2.17.50.0.16-place-orphan.patch, 1.1, NONE binutils-2.17.50.0.16-ppc64-pie.patch, 1.1, NONE binutils-2.17.50.0.16-standards.patch, 1.1, NONE binutils-2.17.50.0.16-symbolic-envvar-revert.patch, 1.1, NONE binutils-2.17.50.0.16-version.patch, 1.1, NONE
- Next message: rpms/cmake/devel cmake.spec,1.17,1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list