X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=d5057a6aa775255d55a764eee3ad18af990de782;hb=7e8458625f0027b7299fd7afdcdaa2bb9f34bf24;hp=33310daf81986075b831b0d512fd1e4702404040;hpb=6f1f915ae4c3c09da723f7133f4ab9eadc19dc47;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 33310daf..d5057a6a 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -148,6 +148,22 @@ def determine_new(changes, files, warn=1): if f.has_key("othercomponents"): new[pkg]["othercomponents"] = f["othercomponents"] + # Fix up the list of target suites + cnf = Config() + for suite in changes["suite"].keys(): + override = cnf.Find("Suite::%s::OverrideSuite" % (suite)) + if override: + (olderr, newerr) = (get_suite(suite, session) == None, + get_suite(override, session) == None) + if olderr or newerr: + (oinv, newinv) = ("", "") + if olderr: oinv = "invalid " + if newerr: ninv = "invalid " + print "warning: overriding %ssuite %s to %ssuite %s" % ( + oinv, suite, ninv, override) + del changes["suite"][suite] + changes["suite"][override] = 1 + for suite in changes["suite"].keys(): for pkg in new.keys(): ql = get_override(pkg, suite, new[pkg]["component"], new[pkg]["type"], session) @@ -427,7 +443,7 @@ class Upload(object): self.pkg.changes["changedbyemail"] = "" self.rejects.append("%s: Changed-By field ('%s') failed to parse: %s" \ - % (filename, changes["changed-by"], msg)) + % (filename, self.pkg.changes["changed-by"], msg)) # Ensure all the values in Closes: are numbers if self.pkg.changes.has_key("closes"): @@ -1843,7 +1859,7 @@ distribution.""" new_filename = os.path.join(utils.poolify(self.pkg.changes["source"], dsc_component), os.path.basename(old_filename)) # TODO: Care about size/md5sum collisions etc - (found, newf) = check_poolfile(new_filename, file_size, file_md5sum, dsc_location_id, session) + (found, newf) = check_poolfile(new_filename, old_dat['size'], old_dat['md5sum'], dsc_location_id, session) if newf is None: utils.copy(old_filename, os.path.join(cnf["Dir::Pool"], new_filename)) @@ -2061,7 +2077,7 @@ distribution.""" os.close(dest_fd) ########################################################################### - def do_reject (self, manual=0, reject_message="", note=""): + def do_reject (self, manual=0, reject_message="", notes=""): """ Reject an upload. If called without a reject message or C{manual} is true, spawn an editor so the user can write one. @@ -2080,9 +2096,10 @@ distribution.""" if manual and not reject_message: (fd, temp_filename) = utils.temp_filename() temp_file = os.fdopen(fd, 'w') - if len(note) > 0: - for line in note: - temp_file.write(line) + if len(notes) > 0: + for note in notes: + temp_file.write("\nAuthor: %s\nVersion: %s\nTimestamp: %s\n\n%s" \ + % (note.author, note.version, note.notedate, note.comment)) temp_file.close() editor = os.environ.get("EDITOR","vi") answer = 'E'