mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-10-31 16:44:13 +00:00 
			
		
		
		
	Quote input used in URLs
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk> Based on a patch to britney by Marc Brockschmidt <he@debian.org>
This commit is contained in:
		
							parent
							
								
									b711ef84a0
								
							
						
					
					
						commit
						5809c672b7
					
				
							
								
								
									
										11
									
								
								britney.py
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								britney.py
									
									
									
									
									
								
							| @ -184,6 +184,7 @@ import time | |||||||
| import copy | import copy | ||||||
| import optparse | import optparse | ||||||
| import operator | import operator | ||||||
|  | import urllib | ||||||
| 
 | 
 | ||||||
| import apt_pkg | import apt_pkg | ||||||
| 
 | 
 | ||||||
| @ -1292,10 +1293,10 @@ class Britney: | |||||||
|                     if oodtxt: oodtxt = oodtxt + "; " |                     if oodtxt: oodtxt = oodtxt + "; " | ||||||
|                     oodtxt = oodtxt + "%s (from <a href=\"http://buildd.debian.org/build.php?" \ |                     oodtxt = oodtxt + "%s (from <a href=\"http://buildd.debian.org/build.php?" \ | ||||||
|                         "arch=%s&pkg=%s&ver=%s\" target=\"_blank\">%s</a>)" % \ |                         "arch=%s&pkg=%s&ver=%s\" target=\"_blank\">%s</a>)" % \ | ||||||
|                         (", ".join(sorted(oodbins[v])), arch, src, v, v) |                         (", ".join(sorted(oodbins[v])), urllib.quote(arch), urllib.quote(src), urllib.quote(v), v) | ||||||
|                 text = "out of date on <a href=\"http://buildd.debian.org/build.php?" \ |                 text = "out of date on <a href=\"http://buildd.debian.org/build.php?" \ | ||||||
|                     "arch=%s&pkg=%s&ver=%s\" target=\"_blank\">%s</a>: %s" % \ |                     "arch=%s&pkg=%s&ver=%s\" target=\"_blank\">%s</a>: %s" % \ | ||||||
|                     (arch, src, source_u[VERSION], arch, oodtxt) |                     (urllib.quote(arch), urllib.quote(src), urllib.quote(source_u[VERSION]), arch, oodtxt) | ||||||
| 
 | 
 | ||||||
|                 if arch in self.options.fucked_arches.split(): |                 if arch in self.options.fucked_arches.split(): | ||||||
|                     text = text + " (but %s isn't keeping up, so nevermind)" % (arch) |                     text = text + " (but %s isn't keeping up, so nevermind)" % (arch) | ||||||
| @ -1326,14 +1327,14 @@ class Britney: | |||||||
|                 if len(new_bugs) > 0: |                 if len(new_bugs) > 0: | ||||||
|                     excuse.addhtml("%s (%s) <a href=\"http://bugs.debian.org/cgi-bin/pkgreport.cgi?" \ |                     excuse.addhtml("%s (%s) <a href=\"http://bugs.debian.org/cgi-bin/pkgreport.cgi?" \ | ||||||
|                         "which=pkg&data=%s&sev-inc=critical&sev-inc=grave&sev-inc=serious\" " \ |                         "which=pkg&data=%s&sev-inc=critical&sev-inc=grave&sev-inc=serious\" " \ | ||||||
|                         "target=\"_blank\">has new bugs</a>!" % (pkg, ", ".join(pkgs[pkg]), pkg)) |                         "target=\"_blank\">has new bugs</a>!" % (pkg, ", ".join(pkgs[pkg]), urllib.quote(pkg))) | ||||||
|                     excuse.addhtml("Updating %s introduces new bugs: %s" % (pkg, ", ".join( |                     excuse.addhtml("Updating %s introduces new bugs: %s" % (pkg, ", ".join( | ||||||
|                         ["<a href=\"http://bugs.debian.org/%s\">#%s</a>" % (a, a) for a in new_bugs]))) |                         ["<a href=\"http://bugs.debian.org/%s\">#%s</a>" % (urllib.quote(a), a) for a in new_bugs]))) | ||||||
|                     update_candidate = False |                     update_candidate = False | ||||||
| 
 | 
 | ||||||
|                 if len(old_bugs) > 0: |                 if len(old_bugs) > 0: | ||||||
|                     excuse.addhtml("Updating %s fixes old bugs: %s" % (pkg, ", ".join( |                     excuse.addhtml("Updating %s fixes old bugs: %s" % (pkg, ", ".join( | ||||||
|                         ["<a href=\"http://bugs.debian.org/%s\">#%s</a>" % (a, a) for a in old_bugs]))) |                         ["<a href=\"http://bugs.debian.org/%s\">#%s</a>" % (urllib.quote(a), a) for a in old_bugs]))) | ||||||
|                 if len(old_bugs) > len(new_bugs) and len(new_bugs) > 0: |                 if len(old_bugs) > len(new_bugs) and len(new_bugs) > 0: | ||||||
|                     excuse.addhtml("%s introduces new bugs, so still ignored (even " |                     excuse.addhtml("%s introduces new bugs, so still ignored (even " | ||||||
|                         "though it fixes more than it introduces, whine at debian-release)" % pkg) |                         "though it fixes more than it introduces, whine at debian-release)" % pkg) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user