[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#484511: Urgencies should all be lower case



Joerg Jaspert <joerg@debian.org> writes:
> On 11407 March 1977, Russ Allbery wrote:

>> You make it sound like it's an ASN.1 encoder or something.  If Joerg
>> says that he absolutely won't change dak,
>
> I wont change it.
>
> But I might look at patches changing it (or better, bzr trees ready to
> merge), if someone really wants it changed.

Patch attached.  I can also create a bzr repository if that's helpful.

> The code in dak, in the current form, is there since 2002-02-13, when
> jennifer (today process_unchecked) got added to the repository. Most
> probably something similar existed in the code before this.  Its also
> nearly unchanged since then, with changes being cosmetical.

As you can see from the patch below, it looked like dak was actually
trying to follow Policy here but the code was buggy (the check was done in
the wrong order).

I also added a fix for logging that I'm not sure is necessary but which
can't hurt (if britney uses that log file, this would also fix britney,
but I don't know how that part of the process works).

=== modified file 'dak/process_accepted.py'
--- dak/process_accepted.py	2008-05-05 19:32:00 +0000
+++ dak/process_accepted.py	2008-06-05 17:19:18 +0000
@@ -81,6 +81,7 @@
 
     def log (self, source, version, urgency):
         "Log an event"
+        urgency = urgency.lower()
         self.log_file.write(" ".join([source, version, urgency])+'\n')
         self.log_file.flush()
         self.writes += 1

=== modified file 'dak/process_unchecked.py'
--- dak/process_unchecked.py	2008-05-05 19:32:00 +0000
+++ dak/process_unchecked.py	2008-06-05 17:15:43 +0000
@@ -906,10 +906,10 @@
     if changes["architecture"].has_key("source"):
         if not changes.has_key("urgency"):
             changes["urgency"] = Cnf["Urgency::Default"]
+        changes["urgency"] = changes["urgency"].lower()
         if changes["urgency"] not in Cnf.ValueList("Urgency::Valid"):
             reject("%s is not a valid urgency; it will be treated as %s by testing." % (changes["urgency"], Cnf["Urgency::Default"]), "Warning: ")
             changes["urgency"] = Cnf["Urgency::Default"]
-        changes["urgency"] = changes["urgency"].lower()
 
 ################################################################################
 
-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: