new[pkg]["section id"] = daklib.database.get_section_id(section)
new[pkg]["priority id"] = daklib.database.get_priority_id(new[pkg]["priority"])
# Sanity checks
- if (section == "debian-installer" and type != "udeb") or \
- (section != "debian-installer" and type == "udeb"):
+ di = section.find("debian-installer") != -1
+ if (di and type != "udeb") or (not di and type == "udeb"):
new[pkg]["section id"] = -1
if (priority == "source" and type != "dsc") or \
(priority != "source" and type == "dsc"):
got_answer = 0
while not got_answer:
answer = daklib.utils.our_raw_input(prompt)
- if not daklib.utils.str_isnum(answer):
+ if not answer.isdigit():
answer = answer[:1].upper()
if answer == "E" or answer == "D":
got_answer = 1
for suite in changes["suite"].keys():
override = Cnf.Find("Suite::%s::OverrideSuite" % (suite))
if override:
+ (olderr, newerr) = (daklib.database.get_suite_id(suite) == -1,
+ daklib.database.get_suite_id(override) == -1)
+ 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
# Validate suites
# Kill me now? **FIXME**
Cnf["Dinstall::Options::No-Mail"] = ""
- bcc = "X-DAK: dak process-new\nX-Katie: this header is obsolete"
+ bcc = "X-DAK: dak process-new\nX-Katie: lisa $Revision: 1.31 $"
if Cnf.has_key("Dinstall::Bcc"):
Upload.Subst["__BCC__"] = bcc + "\nBcc: %s" % (Cnf["Dinstall::Bcc"])
else: