]> git.decadent.org.uk Git - dak.git/blobdiff - dak/process_unchecked.py
Normalize Dir::Queue::Disembargo by cd-ing into it.
[dak.git] / dak / process_unchecked.py
index ec649f0bb825258500cec14b20fc0062c46f7123..36b091f298ba42083407a12e713a972d0c54f403 100755 (executable)
@@ -529,8 +529,14 @@ def check_files():
                         files[file]["byhand"] = 1
                     elif os.path.exists(Cnf["Dir::Queue::New"] + '/' + dsc_filename):
                         files[file]["new"] = 1
-                    elif not os.path.exists(Cnf["Dir::Queue::Accepted"] + '/' + dsc_filename):
-                        reject("no source found for %s %s (%s)." % (source_package, source_version, file))
+                    else:
+                       dsc_file_exists = 0
+                        for myq in ["Accepted", "Embargoed", "Unembargoed"]:
+                            if os.path.exists(Cnf["Dir::Queue::"+myq] + '/' + dsc_filename):
+                               dsc_file_exists = 1
+                               break
+                       if not dsc_file_exists:
+                            reject("no source found for %s %s (%s)." % (source_package, source_version, file))
             # Check the version and for file overwrites
             reject(Upload.check_binary_against_db(file),"")
 
@@ -1134,7 +1140,12 @@ def is_unembargo ():
     if ql:
         return 1
 
-    if pkg.directory == Cnf["Dir::Queue::Disembargo"].rstrip("/"):
+    oldcwd = os.getcwd()
+    os.chdir(Cnf["Dir::Queue::Disembargo"])
+    disdir = os.getcwd()
+    os.chdir(oldcwd)
+
+    if pkg.directory == disdir:
         if changes["architecture"].has_key("source"):
             if Options["No-Action"]: return 1
 
@@ -1339,7 +1350,7 @@ def main():
         Logger = Upload.Logger = daklib.logging.Logger(Cnf, "process-unchecked")
 
     # debian-{devel-,}-changes@lists.debian.org toggles writes access based on this header
-    bcc = "X-DAK: dak process-unchecked\nX-Katie: this header is obsolete"
+    bcc = "X-DAK: dak process-unchecked\nX-Katie: $Revision: 1.65 $"
     if Cnf.has_key("Dinstall::Bcc"):
         Upload.Subst["__BCC__"] = bcc + "\nBcc: %s" % (Cnf["Dinstall::Bcc"])
     else: