X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcontrol_suite.py;h=c94fc1366e7c386cdd1195f3075f78ffc530a1fe;hb=026bdb9580e6d18bf504d2f44d46890df5d89f1a;hp=cdce40c5f5c5a141dbbde346c1b7bd53fce07748;hpb=6a22070bd2886edae182d347cdf645fec1a14c8b;p=dak.git diff --git a/dak/control_suite.py b/dak/control_suite.py index cdce40c5..c94fc136 100755 --- a/dak/control_suite.py +++ b/dak/control_suite.py @@ -75,10 +75,12 @@ Display or alter the contents of a suite using FILE(s), or stdin. def get_pkg(package, version, architecture, session): if architecture == 'source': - q = session.query(DBSource).filter_by(source=package, version=version) + q = session.query(DBSource).filter_by(source=package, version=version) \ + .join(DBSource.poolfile) else: q = session.query(DBBinary).filter_by(package=package, version=version) \ - .join(DBBinary.architecture).filter(Architecture.arch_string.in_([architecture, 'all'])) + .join(DBBinary.architecture).filter(Architecture.arch_string.in_([architecture, 'all'])) \ + .join(DBBinary.poolfile) pkg = q.first() if pkg is None: @@ -249,7 +251,7 @@ def set_suite(file, suite, transaction, britney=False, force=False): else: transaction.copy_binary(pkg, suite, component) - Logger.log(["added", " ".join(key)]) + Logger.log(["added", suite.suite_name, " ".join(key)]) # Check to see which packages need removed and remove them for key, pkid in current.iteritems(): @@ -259,7 +261,7 @@ def set_suite(file, suite, transaction, britney=False, force=False): session.execute("""DELETE FROM src_associations WHERE id = :pkid""", {'pkid': pkid}) else: session.execute("""DELETE FROM bin_associations WHERE id = :pkid""", {'pkid': pkid}) - Logger.log(["removed", " ".join(key), pkid]) + Logger.log(["removed", suite.suite_name, " ".join(key), pkid]) session.commit() @@ -443,9 +445,9 @@ def main (): if action == "set" and not suite.allowcsset: if force: - utils.warn("Would not normally allow setting suite {0} (allowsetcs is FALSE), but --force used".format(suite_name)) + utils.warn("Would not normally allow setting suite {0} (allowcsset is FALSE), but --force used".format(suite_name)) else: - utils.fubar("Will not reset suite {0} due to its database configuration (allowsetcs is FALSE)".format(suite_name)) + utils.fubar("Will not reset suite {0} due to its database configuration (allowcsset is FALSE)".format(suite_name)) if file_list: for f in file_list: