extras-buildsys/utils extras-sign-move.py,1.13,1.14
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Mon Apr 24 17:43:48 UTC 2006
Author: scop
Update of /cvs/fedora/extras-buildsys/utils
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8331
Modified Files:
extras-sign-move.py
Log Message:
Let's not overwrite any packages already in the repo.
Index: extras-sign-move.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-sign-move.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- extras-sign-move.py 23 Apr 2006 18:40:57 -0000 1.13
+++ extras-sign-move.py 24 Apr 2006 17:43:46 -0000 1.14
@@ -204,16 +204,17 @@
infolist = []
for package in files['srpm']:
(n,a,e,v,r) = naevr(package)
- infolist.append('%s-%s-%s' % (n,v,r))
pkg_fn = os.path.basename(package)
srpmloc = os.path.join(destdir, 'SRPMS', pkg_fn)
+ debugprint('Moving %s to %s' % (package, srpmloc))
if os.path.exists(srpmloc):
- debugprint('Deleting %s' % srpmloc)
+ debugprint('%s already exists, ignoring new one' % srpmloc)
if not DEBUG:
- os.unlink(srpmloc)
- debugprint('Moving %s to %s' % (package, srpmloc))
- if not DEBUG:
- shutil.move(package, srpmloc)
+ os.unlink(package)
+ else:
+ infolist.append('%s-%s-%s' % (n,v,r))
+ if not DEBUG:
+ shutil.move(package, srpmloc)
# 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
@@ -233,9 +234,9 @@
arch = '%s/debug' % arch
rpmloc = os.path.join(destdir, arch, pkg_fn)
debugprint("Copying %s to %s" % (package, rpmloc))
- if not DEBUG:
- if os.path.exists(rpmloc):
- os.unlink(rpmloc)
+ if os.path.exists(rpmloc):
+ debugprint('%s already exists, ignoring new one' % rpmloc)
+ elif not DEBUG:
shutil.copy2(package, rpmloc)
if a == 'noarch':
@@ -244,9 +245,9 @@
arch = '%s/debug' % arch
rpmloc = os.path.join(destdir, arch, pkg_fn)
debugprint("Copying %s to %s" % (package, rpmloc))
- if not DEBUG:
- if os.path.exists(rpmloc):
- os.unlink(rpmloc)
+ if os.path.exists(rpmloc):
+ debugprint('%s already exists, ignoring new one' % rpmloc)
+ elif not DEBUG:
shutil.copy2(package, rpmloc)
if not DEBUG:
@@ -277,7 +278,11 @@
rpmloc = os.path.join(destdir, arch, pkg_fn)
debugprint('Moving %s to %s' % (package, rpmloc))
- if not DEBUG:
+ if os.path.exists(rpmloc):
+ debugprint('%s already exists, ignoring new one' % rpmloc)
+ if not DEBUG:
+ os.unlink(package)
+ elif not DEBUG:
shutil.move(package, rpmloc)
# email the list
More information about the fedora-extras-commits
mailing list