fedora-rpmdevtools rmdevelrpms.conf, 1.3, 1.4 rpmdev-rmdevelrpms, 1.2, 1.3 rpmdevtools.spec, 1.19, 1.20

Ville Skytta (scop) fedora-extras-commits at redhat.com
Tue Nov 7 22:35:58 UTC 2006


Author: scop

Update of /cvs/fedora/fedora-rpmdevtools
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8562

Modified Files:
	rmdevelrpms.conf rpmdev-rmdevelrpms rpmdevtools.spec 
Log Message:
* Wed Nov  8 2006 Ville Skyttä <ville.skytta at iki.fi>
- Arch-qualify output of matched packages in rmdevelrpms and allow
  arch-qualified packages in the config file.



Index: rmdevelrpms.conf
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/rmdevelrpms.conf,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- rmdevelrpms.conf	20 Aug 2006 15:40:44 -0000	1.3
+++ rmdevelrpms.conf	7 Nov 2006 22:35:56 -0000	1.4
@@ -2,17 +2,17 @@
 #
 # To prevent rpmdev-rmdevelrpms from removing some packages, add them to
 # nondevpkgs.  The value can be a Python tuple or a whitespace separated
-# string.  For example:
-#   nondevpkgs = ("foo-devel", "bar-devel")
-#   nondevpkgs = "foo-devel bar-devel"
+# string containing package names or name.arch strings.  For example:
+#   nondevpkgs = ("foo-devel.x86_64", "bar-devel")
+#   nondevpkgs = "foo-devel.x86_64 bar-devel"
 #
 nondevpkgs = ""
 
 #
 # To add packages to the removal list, add them to devpkgs.
-# The value can be a Python tuple or a whitespace separated string.
+# The value's format is the same as for nondevpkgs above.
 # For example:
-#   devpkgs = ("libfoo", "bar")
-#   devpkgs = "libfoo bar"
+#   devpkgs = ("libfoo", "bar.i386", "quux-tools.noarch")
+#   devpkgs = "libfoo bar.i386 quux-tools.noarch"
 #
 devpkgs = ""


Index: rpmdev-rmdevelrpms
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/rpmdev-rmdevelrpms,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rpmdev-rmdevelrpms	2 Oct 2006 16:03:21 -0000	1.2
+++ rpmdev-rmdevelrpms	7 Nov 2006 22:35:56 -0000	1.3
@@ -24,7 +24,7 @@
 import getopt, os, re, rpm, stat, sys, types
 
 
-__version__ = "1.3"
+__version__ = "1.4"
 
 
 dev_re  = re.compile("-(?:de(?:buginfo|vel)|sdk|static)\\b", re.IGNORECASE)
@@ -66,10 +66,11 @@
     if not hdr: return 0
     name = hdr[rpm.RPMTAG_NAME]
     if not name: return 0
-    if name in nondevpkgs: return 0
-    if name in devpkgs: return 1
-    if name in def_nondevpkgs: return 0
-    if name in def_devpkgs: return 1
+    na = "%s.%s" % (name, hdr[rpm.RPMTAG_ARCH])
+    if name in nondevpkgs or na in nondevpkgs: return 0
+    if name in devpkgs or na in devpkgs: return 1
+    if name in def_nondevpkgs or na in def_nondevpkgs: return 0
+    if name in def_devpkgs or na in def_devpkgs: return 1
     if jdev_re.search(name): return 0
     if dev_re.search(name): return 1
     if test_re.search(name): return 1
@@ -177,16 +178,20 @@
             confirm = 0
     ts = rpm.TransactionSet("/")
     ts.setVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
-    for pkg in ts.dbMatch():
+    mi = ts.dbMatch()
+    for pkg in mi:
         if isDevelPkg(pkg):
-            # addErase behaves like "--allmatches"
-            ts.addErase(pkg[rpm.RPMTAG_NAME])
+            ts.addErase(mi.instance())
     ts.order()
     pkgs = []
     try:
         te = ts.next()
         while te:
-            pkgs.append(te.NEVR())
+            arch = te.A()
+            if arch:
+                pkgs.append("%s.%s" % (te.NEVR(), arch))
+            else:
+                pkgs.append(te.NEVR())
             te = ts.next()
     except StopIteration:
         pass
@@ -196,6 +201,7 @@
             print "Found %d devel packages:" % len(pkgs)
             for pkg in pkgs:
                 print "  %s" % pkg
+            # TODO: is there a way to get arch for the unresolved deps?
             unresolved = ts.check()
             if unresolved:
                 print "...but removal would cause unresolved dependencies:"


Index: rpmdevtools.spec
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/rpmdevtools.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- rpmdevtools.spec	25 Oct 2006 12:22:46 -0000	1.19
+++ rpmdevtools.spec	7 Nov 2006 22:35:56 -0000	1.20
@@ -120,6 +120,10 @@
 
 
 %changelog
+* Wed Nov  8 2006 Ville Skyttä <ville.skytta at iki.fi>
+- Arch-qualify output of matched packages in rmdevelrpms and allow
+  arch-qualified packages in the config file.
+
 * Wed Oct 25 2006 Ville Skyttä <ville.skytta at iki.fi> - 5.3-1
 - Update spectool to 1.0.8, fixes #212108.
 




More information about the scm-commits mailing list