Univention Bugzilla – Attachment 2326 Details for
Bug 17428
Falsche Parameteranzahl für clean-Eintrag in /etc/apt/mirror.list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix format string bug.
17428_mirror-clean.diff (text/plain), 6.35 KB, created by
Philipp Hahn
on 2010-03-08 12:42:58 CET
(
hide
)
Description:
Fix format string bug.
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2010-03-08 12:42:58 CET
Size:
6.35 KB
patch
obsolete
>Fix wrong format string with online/repository/clean=true (Bug #17428) >Document online/repository/clean variable. >Fix handling of repository/online/component/%s/clean. >Index: debian/univention-updater.univention-config-registry >=================================================================== >--- debian/univention-updater.univention-config-registry (Revision 15591) >+++ debian/univention-updater.univention-config-registry (Arbeitskopie) >@@ -57,3 +57,4 @@ > Variables: repository/mirror/threads > Variables: repository/mirror/architectures > Variables: repository/mirror/version/.* >+Variables: online/repository/clean >Index: debian/changelog >=================================================================== >--- debian/changelog (Revision 15591) >+++ debian/changelog (Arbeitskopie) >@@ -1,3 +1,9 @@ >+univention-updater (5.0.73-1) unstable; urgency=low >+ >+ * Fix wrong format string with online/repository/clean=true (Bug #17428) >+ >+ -- Philipp Hahn <hahn@univention.de> Thu, 25 Feb 2010 17:33:58 +0100 >+ > univention-updater (5.0.72-1) unstable; urgency=low > > * Handle errors during repository creation/updates (Bug #15056) >Index: debian/univention-updater.univention-config-registry-variables >=================================================================== >--- debian/univention-updater.univention-config-registry-variables (Revision 15591) >+++ debian/univention-updater.univention-config-registry-variables (Arbeitskopie) >@@ -75,3 +75,9 @@ > Description[en]=Path to an executable shell-script which is executed after every update > Type=str > Categories=service-software-management >+ >+[online/repository/clean] >+Description[de]=Skript erzeugen zum Löschen nicht länger benötigter Pakete aus dem lokalen Repository >+Description[en]=Create script to delete obsolete packages from the local repository >+Type=bool >+Categories=service-software-management >Index: modules/univention/updater/tools.py >=================================================================== >--- modules/univention/updater/tools.py (Revision 15591) >+++ modules/univention/updater/tools.py (Arbeitskopie) >@@ -353,7 +353,8 @@ > '''Return a string of Debian repository statements for all UCS versions > between start and end. > For dists=True, additional entries for the parts below dists/ are also added. >- For clean=True, additional clean statements are added if online/repository/clean is enabled.''' >+ With clean=True, repository/online/clean controls if additional clean statements for apt-mirror are added. >+ ''' > repos = '' > if not self.online_repository: > return repos >@@ -416,7 +417,7 @@ > path = 'http://%s:%s/%s/%s.%s/%s/' % ( self.repository_server, self.repository_port, self.repository_prefix, patch_inc.major, patch_inc.minor, part ) > else: > path = 'http://%s:%s/%s.%s/%s/' % ( self.repository_server, self.repository_port, patch_inc.major, patch_inc.minor, part ) >- repos += 'clean %s/%s.%s-%s/\n' % ( path, patch_inc.major, patch_inc.minor , patch_inc.patchlevel ) >+ repos += 'clean %s%s.%s-%s/\n' % ( path, patch_inc.major, patch_inc.minor , patch_inc.patchlevel ) > > if printed: > repos += '\n' >@@ -438,7 +439,7 @@ > def print_security_repositories( self, clean = False, start = None, end = None, all_security_updates = False ): > '''Return a string of Debian repository statements for all UCS security > updates for UCS versions between start and end. >- For clean=True, additional clean statements are added if online/repository/clean is enabled. >+ With clean=True, repository/online/clean controls if additional clean statements for apt-mirror are added. > For all_security_updates=True, all available instead of all needed > statements for security updates are returned.''' > repos = '' >@@ -486,9 +487,9 @@ > repos += 'deb http://%s:%s/%d.%d/%s/ sec%s/%s/\n' % ( self.repository_server, self.repository_port, start.major, start.minor, part, p, arch) > if clean: > if self.repository_prefix: >- repos += 'clean http://%s:%s/%s/%d.%d/%s/sec%s/%s/\n' % ( self.repository_server, self.repository_port, self.repository_prefix, start.major, start.minor, part, p ) >+ repos += 'clean http://%s:%s/%s/%d.%d/%s/sec%s/\n' % ( self.repository_server, self.repository_port, self.repository_prefix, start.major, start.minor, part, p ) > else: >- repos += 'clean http://%s:%s/%d.%d/%s/sec%s/%s/\n' % ( self.repository_server, self.repository_port, start.major, start.minor, part, p ) >+ repos += 'clean http://%s:%s/%d.%d/%s/sec%s/\n' % ( self.repository_server, self.repository_port, start.major, start.minor, part, p ) > if printed: > repos += '\n' > printed = False >@@ -522,7 +523,8 @@ > > def print_component_repositories( self, clean = False ): > '''Return a string of Debian repository statements for all enabled components. >- For clean=True, additional clean statements are added if online/repository/clean is enabled.''' >+ With clean=True, repository/online/component/%s/clean controls if additional clean statements for apt-mirror are added. >+ ''' > repos = '' > if not self.online_repository: > return repos >@@ -552,8 +554,9 @@ > parts = self.configRegistry.get('repository/online/component/%s/parts' % component, 'maintained').split(',') > username = self.configRegistry.get('repository/online/component/%s/username' % component, None) > password = self.configRegistry.get('repository/online/component/%s/password' % component, None) >+ clean2 = False > if clean: >- clean = self.configRegistry.get( 'repository/online/component/%s/clean' % component, False ) >+ clean2 = self.configRegistry.get( 'repository/online/component/%s/clean' % component, False ) > > # allow None as a component prefix > if repository_prefix.lower() == 'none': >@@ -589,7 +592,7 @@ > else: > path = 'http://%s%s:%s/%s/%s/component/%s/' % ( auth_string, repository_server, repository_port, version, part, component) > repos += 'deb %s ./ \n' % path >- if clean: >+ if clean2: > repos += 'clean %s\n' % path > printed = True > else: >@@ -603,7 +606,7 @@ > else: > path = 'http://%s%s:%s/%s/%s/' % ( auth_string, repository_server, repository_port, version, part ) > repos += 'deb %scomponent %s/%s/\n' % ( path, component, arch ) >- if clean: >+ if clean2: > if repository_prefix: > path = 'http://%s%s:%s/%s/%s/%s/' % ( auth_string, repository_server, repository_port, repository_prefix, version, part ) > else:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 17428
: 2326