extras-buildsys/utils extras-sign-move.py,1.7,1.8

Ville Skytta (scop) fedora-extras-commits at redhat.com
Sun Mar 19 22:42:34 UTC 2006


Author: scop

Update of /cvs/fedora/extras-buildsys/utils
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26221

Modified Files:
	extras-sign-move.py 
Log Message:
- Add q'n'd arch copy functionality, use it for wine*.i386 -> x86_64.
- Make code match comments wrt. use of copy2 for noarch packages.



Index: extras-sign-move.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-sign-move.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- extras-sign-move.py	17 Mar 2006 07:46:49 -0000	1.7
+++ extras-sign-move.py	19 Mar 2006 22:42:27 -0000	1.8
@@ -40,6 +40,20 @@
             '5':['ppc','x86_64', 'i386'],
             'development':['ppc','x86_64','i386'],
             }
+# Note: *no* depsolving is done for these.
+copydict = { 'wine.i386': ['x86_64'],
+             'wine-arts.i386': ['x86_64'],
+             'wine-capi.i386': ['x86_64'],
+             'wine-cms.i386': ['x86_64'],
+             'wine-debuginfo.i386': ['x86_64'],
+             'wine-devel.i386': ['x86_64'],
+             'wine-esd.i386': ['x86_64'],
+             'wine-jack.i386': ['x86_64'],
+             'wine-ldap.i386': ['x86_64'],
+             'wine-nas.i386': ['x86_64'],
+             'wine-tools.i386': ['x86_64'],
+             'wine-twain.i386': ['x86_64'],
+             }
 ts = rpmUtils.transaction.initReadOnlyTransaction()
 
 
@@ -198,11 +212,25 @@
 
     # go through each package and move it to the right arch location.
     # if it is a noarch package, copy2 it to all arch locations and unlink it
-    # if it is a debuginfo package move it into the 'debug' dir for that arch
+    # if it is listed in copydict, copy2 it around as appropriate
+    # if it is a debuginfo package, move it into the 'debug' dir for that arch
     print "Moving Packages into Place"
     for package in files['rpm'] + files['debuginfo']:
         pkg_fn = os.path.basename(package)
         (n,a,e,v,r) = naevr(package)
+
+        copyarchs = copydict.get('%s.%s' % (n, a))
+        if copyarchs:
+            for arch in copyarchs:
+                if not arch in archdict[dist]:
+                    continue
+                if package in files['debuginfo']:
+                    arch = '%s/debug' % arch
+                rpmloc = os.path.join(destdir, arch, pkg_fn)
+                debugprint("Copying %s to %s" % (package, rpmloc))
+                if not DEBUG:
+                    shutil.copy2(package, rpmloc)
+
         if a == 'noarch':
             for arch in archdict[dist]:
                 if package in files['debuginfo']:
@@ -210,7 +238,7 @@
                 rpmloc = os.path.join(destdir, arch, pkg_fn)
                 debugprint("Copying %s to %s" % (package, rpmloc))
                 if not DEBUG:                
-                    shutil.copy(package, rpmloc)
+                    shutil.copy2(package, rpmloc)
             
             if not DEBUG:
                 os.unlink(package)




More information about the fedora-extras-commits mailing list