From 65fa07f28a90e2c19aded196593198b5c393edd4 Mon Sep 17 00:00:00 2001 From: rosbuild Date: Tue, 7 Jan 2014 23:29:00 +0000 Subject: [PATCH 1/3] Better error output. --- src/reprepro_updater/changes_parsing.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/reprepro_updater/changes_parsing.py b/src/reprepro_updater/changes_parsing.py index e7a37615..088fdc2c 100644 --- a/src/reprepro_updater/changes_parsing.py +++ b/src/reprepro_updater/changes_parsing.py @@ -13,6 +13,12 @@ def __init__(self, filename): raise Exception("Failed to load changes file %s. [[%s]]" % (filename, ex)) + def __repr__(self): + return "ChangesFile(%s)"%(self.filename) + + def __str__(self): + return "ChangesFile(%s): %s"%(self.filename, self.content) + def find_changes_files(folder): changesfiles = [] From 2e014c0052f244a71731cfa781ebaa7880060c11 Mon Sep 17 00:00:00 2001 From: Austin Hendrix Date: Tue, 7 Jan 2014 23:39:29 +0000 Subject: [PATCH 2/3] Actually say which packages were invalid. --- scripts/include_folder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/include_folder.py b/scripts/include_folder.py index 534dd8f9..1549b085 100644 --- a/scripts/include_folder.py +++ b/scripts/include_folder.py @@ -49,11 +49,12 @@ (options.folders, [os.listdir(f) for f in options.folders])) valid_changes = [c for c in changefiles if c.content['Binary'] == options.package] +invalid_changes = [c.content['Binary'] for c in changefiles if c.content['Binary'] != options.package] extraneous_packages = set(changefiles) - set(valid_changes) if extraneous_packages: parser.error("Invalid packages detected in folders %s. [%s]" % - (options.folders, extraneous_packages)) + (options.folders, invalid_changes)) lockfile = os.path.join(options.repo_path, 'lock') From 6b667b50fc30b8ca878ff34a6beb35d056537143 Mon Sep 17 00:00:00 2001 From: Austin Hendrix Date: Tue, 7 Jan 2014 23:43:15 +0000 Subject: [PATCH 3/3] Allow multi-package uploads. --- scripts/include_folder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/include_folder.py b/scripts/include_folder.py index 1549b085..fabfe07a 100644 --- a/scripts/include_folder.py +++ b/scripts/include_folder.py @@ -48,8 +48,8 @@ parser.error("Folders %s doesn't contain a changes file. %s" % (options.folders, [os.listdir(f) for f in options.folders])) -valid_changes = [c for c in changefiles if c.content['Binary'] == options.package] -invalid_changes = [c.content['Binary'] for c in changefiles if c.content['Binary'] != options.package] +valid_changes = [c for c in changefiles if options.package in c.content['Binary']] +invalid_changes = [c.content['Binary'] for c in changefiles if not options.package in c.content['Binary']] extraneous_packages = set(changefiles) - set(valid_changes) if extraneous_packages: