mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-11-04 02:24:24 +00:00 
			
		
		
		
	Improve handling of bugs listed against src:foo
Rather than mapping "src:foo" to "foo" whilst building the bug hashes, we store the src: bugs "as is" in the hash, and then include them in the list of relevant bugs when building the list for a source package. This avoids a situation where a bug filed against "src:foo" can impede the migration of the binary package "foo", built from a different source package. Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
		
							parent
							
								
									b36fb9a2ce
								
							
						
					
					
						commit
						a8332058ee
					
				
							
								
								
									
										26
									
								
								britney.py
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								britney.py
									
									
									
									
									
								
							@ -602,7 +602,6 @@ class Britney:
 | 
			
		||||
                self.__log("Malformed line found in line %s" % (line), type='W')
 | 
			
		||||
                continue
 | 
			
		||||
            pkg = l[0]
 | 
			
		||||
            if pkg.startswith('src:'): pkg = pkg[4:]
 | 
			
		||||
            bugs.setdefault(pkg, [])
 | 
			
		||||
            bugs[pkg] += l[1].split(",")
 | 
			
		||||
        return bugs
 | 
			
		||||
@ -655,6 +654,9 @@ class Britney:
 | 
			
		||||
            elif pkg not in self.bugs['unstable']:
 | 
			
		||||
                self.bugs['unstable'][pkg] = []
 | 
			
		||||
 | 
			
		||||
            if pkg.startswith("src:"):
 | 
			
		||||
                pkg = pkg[4:]
 | 
			
		||||
 | 
			
		||||
            # retrieve the maximum version of the package in testing:
 | 
			
		||||
            maxvert = self.__maxver(pkg, 'testing')
 | 
			
		||||
 | 
			
		||||
@ -1390,13 +1392,21 @@ class Britney:
 | 
			
		||||
        # one,  the check fails and we set update_candidate to False to block the update
 | 
			
		||||
        if suite == 'unstable':
 | 
			
		||||
            for pkg in pkgs.keys():
 | 
			
		||||
                if pkg not in self.bugs['testing']:
 | 
			
		||||
                    self.bugs['testing'][pkg] = []
 | 
			
		||||
                if pkg not in self.bugs['unstable']:
 | 
			
		||||
                    self.bugs['unstable'][pkg] = []
 | 
			
		||||
 | 
			
		||||
                new_bugs = sorted(set(self.bugs['unstable'][pkg]).difference(self.bugs['testing'][pkg]))
 | 
			
		||||
                old_bugs = sorted(set(self.bugs['testing'][pkg]).difference(self.bugs['unstable'][pkg]))
 | 
			
		||||
                bugs_t = []
 | 
			
		||||
                bugs_u = []
 | 
			
		||||
                if testingbugs.has_key(pkg):
 | 
			
		||||
                    bugs_t.extend(testingbugs[pkg])
 | 
			
		||||
                if unstablebugs.has_key(pkg):
 | 
			
		||||
                    bugs_u.extend(unstablebugs[pkg])
 | 
			
		||||
                if 'source' in pkgs[pkg]:
 | 
			
		||||
                    spkg = "src:%s" % (pkg)
 | 
			
		||||
                    if testingbugs.has_key(spkg):
 | 
			
		||||
                        bugs_t.extend(testingbugs[spkg])
 | 
			
		||||
                    if unstablebugs.has_key(spkg):
 | 
			
		||||
                        bugs_u.extend(unstablebugs[spkg])
 | 
			
		||||
 
 | 
			
		||||
                new_bugs = sorted(set(bugs_u).difference(bugs_t))
 | 
			
		||||
                old_bugs = sorted(set(bugs_t).difference(bugs_u))
 | 
			
		||||
 | 
			
		||||
                if len(new_bugs) > 0:
 | 
			
		||||
                    excuse.addhtml("%s (%s) <a href=\"http://bugs.debian.org/cgi-bin/pkgreport.cgi?" \
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user