View | Details | Raw Unified | Return to bug 34060
Collapse All | Expand All

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

Return to bug 34060