X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_accepted.py;fp=dak%2Fprocess_accepted.py;h=d2b01c6441cbb22440b6836db285378160f3a675;hb=603d8ace7d4f942c999c29556bde38ec2516b9a8;hp=cc3f7eabdfe170ef1f4f7b19085144ac6d8ae2ed;hpb=fdf3c42445b4f11f4cd71634dd2b57cb7d7a4f36;p=dak.git diff --git a/dak/process_accepted.py b/dak/process_accepted.py index cc3f7eab..d2b01c64 100755 --- a/dak/process_accepted.py +++ b/dak/process_accepted.py @@ -169,9 +169,11 @@ def init(): ('h',"help","Dinstall::Options::Help"), ('n',"no-action","Dinstall::Options::No-Action"), ('p',"no-lock", "Dinstall::Options::No-Lock"), - ('s',"no-mail", "Dinstall::Options::No-Mail")] + ('s',"no-mail", "Dinstall::Options::No-Mail"), + ('d',"directory", "Dinstall::Options::Directory", "HasArg")] - for i in ["automatic", "help", "no-action", "no-lock", "no-mail", "version"]: + for i in ["automatic", "help", "no-action", "no-lock", "no-mail", + "version", "directory"]: if not Cnf.has_key("Dinstall::Options::%s" % (i)): Cnf["Dinstall::Options::%s" % (i)] = "" @@ -181,6 +183,15 @@ def init(): if Options["Help"]: usage() + # If we have a directory flag, use it to find our files + if Cnf["Dinstall::Options::Directory"] != "": + # Note that we clobber the list of files we were given in this case + # so warn if the user has done both + if len(changes_files) > 0: + utils.warn("Directory provided so ignoring files given on command line") + + changes_files = utils.get_changes_files(Cnf["Dinstall::Options::Directory"]) + Upload = queue.Upload(Cnf) projectB = Upload.projectB @@ -382,6 +393,9 @@ def install (): if not database.copy_temporary_contents(package, version, files[newfile]): reject("Missing contents for package") + orig_tar_id = Upload.pkg.orig_tar_id + orig_tar_location = Upload.pkg.orig_tar_location + # If this is a sourceful diff only upload that is moving # cross-component we need to copy the .orig.tar.gz into the new # component too for the same reasons as above.