comparison bin/publishdebianpackages.py @ 505:b7aad4cb58bb

don't remove packages if a track is deactivated
author Bjoern Ricks <bricks@intevation.de>
date Fri, 05 Nov 2010 10:52:06 +0000
parents eacfd3744d16
children bccd69dedbe5
comparison
equal deleted inserted replaced
504:dcec034fed97 505:b7aad4cb58bb
120 # scp the packages to the cache dir 120 # scp the packages to the cache dir
121 call(cmdexpand("scp -p @scp_flags @files $cachedir/", files=files, 121 call(cmdexpand("scp -p @scp_flags @files $cachedir/", files=files,
122 scp_flags=scp_flags, cachedir=destdir)) 122 scp_flags=scp_flags, cachedir=destdir))
123 123
124 def remove_old_packages(cachedb, newpackages, quiet): 124 def remove_old_packages(cachedb, newpackages, quiet):
125 newfiles = [package.filename for package in newpackages] 125 oldpackages = cachedb.get_old_packages(newpackages)
126 oldpackages = cachedb.get_old_packages(newfiles)
127 for package in oldpackages: 126 for package in oldpackages:
128 # better check if the file really exists 127 # better check if the file really exists
129 if os.path.isfile(package.filename): 128 if os.path.isfile(package.filename):
130 if not quiet: 129 if not quiet:
131 print "removing file %s" % package.filename 130 print "removing file %s" % package.filename
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)