diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-updater/debian/changelog b/branches/ucs-3.2/ucs-3.2-0/base/univention-updater/debian/changelog index bcb95d1..ba902a0 100644 --- a/branches/ucs-3.2/ucs-3.2-0/base/univention-updater/debian/changelog +++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-updater/debian/changelog @@ -1,3 +1,9 @@ +univention-updater (9.0.38-11) unstable; urgency=low + + * Fix dists/Packages generation (Bug #34060) + + -- Philipp Hahn Wed, 05 Feb 2014 15:06:43 +0100 + univention-updater (9.0.38-10) unstable; urgency=low * Extend copyright to 2014. diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-updater/modules/univention/updater/mirror.py b/branches/ucs-3.2/ucs-3.2-0/base/univention-updater/modules/univention/updater/mirror.py index ac7be4e..534cfda 100644 --- a/branches/ucs-3.2/ucs-3.2-0/base/univention-updater/modules/univention/updater/mirror.py +++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-updater/modules/univention/updater/mirror.py @@ -186,7 +186,6 @@ class UniventionMirror( UniventionUpdater ): # iterate over all local repositories for dirname, version, is_maintained in self.list_local_repositories( start=self.version_start, end=self.version_end, unmaintained = False ): - if version.patchlevel == 0: archlist = ( 'i386', 'amd64' ) for arch in archlist: # create dists directory if missing @@ -209,10 +208,10 @@ class UniventionMirror( UniventionUpdater ): if not last_version is None: # do not compare last_version with None by "!=" or "==" # do not append Packages from other major versions if last_version.major == version.major: - # get last three items of pathname and build prefix - prefix = '../../../%s' % os.path.join( *( last_dirname.split('/')[-3:]) ) - subprocess.call( 'sed -re "s|^Filename: %s/|Filename: %s/%s/|" < %s/dists/univention/main/binary-%s/Packages >> %s' % ( - arch, prefix, arch, last_dirname, arch, fn ), shell=True ) + # go up to repobase, otherwise concatenation does not work + prefix = os.path.join(os.path.relpath(repobase, dirname), os.path.relpath(last_dirname, repobase)) + subprocess.call(r'sed -re "s|^Filename: ([^./])|Filename: %s/\1|" < %s/dists/univention/main/binary-%s/Packages >> %s' % ( + prefix, last_dirname, arch, fn ), shell=True ) # create compressed copy of dists packages files subprocess.call( 'gzip < %s > %s.gz' % (fn, fn), shell=True )