Bug#329833: updated patch (Re: Bug#329833: dak should use 'close' with version, not 'fixed' tag, for NMUs)
* Guillem Jover [Sun, 22 Jan 2006 03:01:08 +0200]: Hi, Hi, Attached is a patch that makes dak use the versioned closes instead of the obsolete fixed tag. This is the relevant ChangeLog entry: I updated your patch so that applies cleanly to the latest version in [1], attached. [1] http://ftp-master.debian.org/bzr/debian-archive-kit/ -- Adeodato Simó dato at net.com.org.es Debian Developer adeodato at debian.org Listening to: Lemonfly - Traición 2006-01-22 Guillem Jover [EMAIL PROTECTED] * daklib/queue.py (nmu_p): Remove unused class. (Upload.__init__): Do not initialize self.nmu. (Upload.close_bugs): Send a versioned close mail for NMUs and for uploads to experimental. * templates/process-unchecked.bug-close: Use __SUITE__. * templates/process-unchecked.bug-experimental-fixed: Remove. * templates/process-unchecked.bug-nmu-fixed: Likewise. === modified file 'daklib/queue.py' --- daklib/queue.py +++ daklib/queue.py @@ -45,56 +45,10 @@ ### -class nmu_p: -# Read in the group maintainer override file -def __init__ (self, Cnf): -self.group_maint = {} -self.Cnf = Cnf -if Cnf.get(Dinstall::GroupOverrideFilename): -filename = Cnf[Dir::Override] + Cnf[Dinstall::GroupOverrideFilename] -file = utils.open_file(filename) -for line in file.readlines(): -line = utils.re_comments.sub('', line).lower().strip() -if line != : -self.group_maint[line] = 1 -file.close() - -def is_an_nmu (self, pkg): -Cnf = self.Cnf -changes = pkg.changes -dsc = pkg.dsc - -i = utils.fix_maintainer (dsc.get(maintainer, - Cnf[Dinstall::MyEmailAddress]).lower()) -(dsc_rfc822, dsc_rfc2047, dsc_name, dsc_email) = i -# changes[changedbyname] == dsc_name is probably never true, but better safe than sorry -if dsc_name == changes[maintainername].lower() and \ - (changes[changedby822] == or changes[changedbyname].lower() == dsc_name): -return 0 - -if dsc.has_key(uploaders): -uploaders = dsc[uploaders].lower().split(,) -uploadernames = {} -for i in uploaders: -(rfc822, rfc2047, name, email) = utils.fix_maintainer (i.strip()) -uploadernames[name] = -if uploadernames.has_key(changes[changedbyname].lower()): -return 0 - -# Some group maintained packages (e.g. Debian QA) are never NMU's -if self.group_maint.has_key(changes[maintaineremail].lower()): -return 0 - -return 1 - -### - class Upload: def __init__(self, Cnf): self.Cnf = Cnf -# Read in the group-maint override file -self.nmu = nmu_p(Cnf) self.accept_count = 0 self.accept_bytes = 0L self.pkg = Pkg(changes = {}, dsc = {}, dsc_files = {}, files = {}, @@ -297,54 +251,25 @@ return summary bugs.sort() -if not self.nmu.is_an_nmu(self.pkg): -if changes[distribution].has_key(experimental): - # tag bugs as fixed-in-experimental for uploads to experimental - summary += Setting bugs to severity fixed: - control_message = - for bug in bugs: - summary += %s % (bug) - control_message += tag %s + fixed-in-experimental\n % (bug) - if action and control_message != : - Subst[__CONTROL_MESSAGE__] = control_message - mail_message = utils.TemplateSubst(Subst,Cnf[Dir::Templates]+/process-unchecked.bug-experimental-fixed) - utils.send_mail (mail_message) - if action: - self.Logger.log([setting bugs to fixed]+bugs) - - - else: - summary += Closing bugs: - for bug in bugs: - summary += %s % (bug) - if action: - Subst[__BUG_NUMBER__] = bug - if changes[distribution].has_key(stable): - Subst[__STABLE_WARNING__] = +summary += Closing bugs: +for bug in bugs: +summary += %s % (bug) +if action: +Subst[__BUG_NUMBER__] = bug +if changes[distribution].has_key(stable): +Subst[__STABLE_WARNING__] = Note that this package is not part of the released stable Debian distribution. It may have dependencies on other unreleased software, or other instabilities. Please take
Bug#329833: dak should use 'close' with version, not 'fixed' tag, for NMUs
tags 329833 patch thanks Hi, Attached is a patch that makes dak use the versioned closes instead of the obsolete fixed tag. This is the relevant ChangeLog entry: 2006-01-22 Guillem Jover [EMAIL PROTECTED] * katie.py (nmu_p): Remove unused class. (Katie.__init__): Do not initialize self.nmu. (Katie.close_bugs): Send a versioned close mail for NMUs and for uploads to experimental. * templates/jennifer.bug-close: Use __SUITE__. * templates/jennifer.bug-experimental-fixed: Remove. * templates/jennifer.bug-nmu-fixed: Likewise. You'll have to remove the two templates files. And I've not executed it, so please double check that the changes are fine, even if trivial. :) I assume that not sending mail if changes[distribution].has_key(stable) is on purpose, but wondered about it anyway. regards, guillem 2006-01-22 Guillem Jover [EMAIL PROTECTED] * katie.py (nmu_p): Remove unused class. (Katie.__init__): Do not initialize self.nmu. (Katie.close_bugs): Send a versioned close mail for NMUs and for uploads to experimental. * templates/jennifer.bug-close: Use __SUITE__. * templates/jennifer.bug-experimental-fixed: Remove. * templates/jennifer.bug-nmu-fixed: Likewise. Index: katie.py === RCS file: /cvs/dak/dak/katie.py,v retrieving revision 1.59 diff -u -r1.59 katie.py --- katie.py17 Dec 2005 10:57:03 - 1.59 +++ katie.py22 Jan 2006 00:24:11 - @@ -45,56 +45,10 @@ ### -class nmu_p: -# Read in the group maintainer override file -def __init__ (self, Cnf): -self.group_maint = {}; -self.Cnf = Cnf; -if Cnf.get(Dinstall::GroupOverrideFilename): -filename = Cnf[Dir::Override] + Cnf[Dinstall::GroupOverrideFilename]; -file = utils.open_file(filename); -for line in file.readlines(): -line = utils.re_comments.sub('', line).lower().strip(); -if line != : -self.group_maint[line] = 1; -file.close(); - -def is_an_nmu (self, pkg): -Cnf = self.Cnf; -changes = pkg.changes; -dsc = pkg.dsc; - -i = utils.fix_maintainer (dsc.get(maintainer, - Cnf[Dinstall::MyEmailAddress]).lower()); -(dsc_rfc822, dsc_rfc2047, dsc_name, dsc_email) = i; -# changes[changedbyname] == dsc_name is probably never true, but better safe than sorry -if dsc_name == changes[maintainername].lower() and \ - (changes[changedby822] == or changes[changedbyname].lower() == dsc_name): -return 0; - -if dsc.has_key(uploaders): -uploaders = dsc[uploaders].lower().split(,); -uploadernames = {}; -for i in uploaders: -(rfc822, rfc2047, name, email) = utils.fix_maintainer (i.strip()); -uploadernames[name] = ; -if uploadernames.has_key(changes[changedbyname].lower()): -return 0; - -# Some group maintained packages (e.g. Debian QA) are never NMU's -if self.group_maint.has_key(changes[maintaineremail].lower()): -return 0; - -return 1; - -### - class Katie: def __init__(self, Cnf): self.Cnf = Cnf; -# Read in the group-maint override file -self.nmu = nmu_p(Cnf); self.accept_count = 0; self.accept_bytes = 0L; self.pkg = Pkg(changes = {}, dsc = {}, dsc_files = {}, files = {}, @@ -296,54 +250,26 @@ return summary; bugs.sort(); -if not self.nmu.is_an_nmu(self.pkg): -if changes[distribution].has_key(experimental): - # tag bugs as fixed-in-experimental for uploads to experimental - summary += Setting bugs to severity fixed: ; - control_message = ; - for bug in bugs: - summary += %s % (bug); - control_message += tag %s + fixed-in-experimental\n % (bug); - if action and control_message != : - Subst[__CONTROL_MESSAGE__] = control_message; - mail_message = utils.TemplateSubst(Subst,Cnf[Dir::Templates]+/jennifer.bug-experimental-fixed); - utils.send_mail (mail_message); - if action: - self.Logger.log([setting bugs to fixed]+bugs); - - - else: - summary += Closing bugs: ; - for bug in bugs: - summary += %s % (bug); - if action: - Subst[__BUG_NUMBER__] = bug; - if changes[distribution].has_key(stable): -