X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_policy.py;h=ddd05b7c65166f18b4011dafe47a5f82053ec7ac;hb=a1605d90114be9fdf8b6942ae4e3a8c376e808fd;hp=db459607588971ae19c1b80b6dc04dd85b44560a;hpb=2af1fccea2cdefc22dc0bab0540287611014abd1;p=dak.git diff --git a/dak/process_policy.py b/dak/process_policy.py index db459607..ddd05b7c 100755 --- a/dak/process_policy.py +++ b/dak/process_policy.py @@ -81,7 +81,8 @@ def do_comments(dir, srcqueue, opref, npref, line, fn, transaction): if opref != npref: newcomm = npref + comm[len(opref):] - transaction.fs.move(os.path.join(dir, comm), os.path.join(dir, newcomm)) + newcomm = utils.find_next_free(os.path.join(dir, newcomm)) + transaction.fs.move(os.path.join(dir, comm), newcomm) ################################################################################ @@ -162,16 +163,19 @@ def comment_accept(upload, srcqueue, comments, transaction): if upload.source is not None: for f in [ df.poolfile for df in upload.source.srcfiles ]: dst = os.path.join(copydir, f.basename) - fs.copy(f.fullpath, dst, mode=mode) + if not os.path.exists(dst): + fs.copy(f.fullpath, dst, mode=mode) for db_binary in upload.binaries: f = db_binary.poolfile dst = os.path.join(copydir, f.basename) - fs.copy(f.fullpath, dst, mode=mode) + if not os.path.exists(dst): + fs.copy(f.fullpath, dst, mode=mode) src = os.path.join(upload.policy_queue.path, upload.changes.changesname) dst = os.path.join(copydir, upload.changes.changesname) - fs.copy(src, dst, mode=mode) + if not os.path.exists(dst): + fs.copy(src, dst, mode=mode) if upload.source is not None and not Options['No-Action']: urgency = upload.changes.urgency