[Reproducible-commits] [misc] 01/01: hacky module (sorry) and edit-notes

Chris West faux-guest at moszumanska.debian.org
Sun Feb 22 14:50:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

faux-guest pushed a commit to branch master
in repository misc.

commit 6f0ccbb1670d078eb3613de8f710402d26073c1e
Author: Chris West (Faux) <git at goeswhere.com>
Date:   Sun Feb 22 14:50:17 2015 +0000

    hacky module (sorry) and edit-notes
---
 clean-notes    | 33 +++++++++++++++++----------------
 clean-notes.py |  1 +
 edit-notes     | 21 +++++++++++++++++++++
 3 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/clean-notes b/clean-notes
index 0c1406d..51a1257 100755
--- a/clean-notes
+++ b/clean-notes
@@ -105,22 +105,24 @@ parser.add_argument('-d', '--disable', action='append', default=[],
                     help="disable a particular view (choose from above)")
 parser.add_argument("-v", "--verbose", action="store_true")
 parser.add_argument("-n", "--dry-run", action="store_true")
-args = parser.parse_args()
 
-disabled_features = [
-    'fixed-magically',
-    'new-tested-version',
-    ]
-#    'missing-version',
-#    'missing-usertagged',
-#    'not-usertagged',
-args.disable.extend(disabled_features)
-for feature in args.enable:
-    if feature in args.disable:
-        args.disable.remove(feature)
+if __name__ == '__main__':
+    args = parser.parse_args()
+
+    disabled_features = [
+        'fixed-magically',
+        'new-tested-version',
+        ]
+    #    'missing-version',
+    #    'missing-usertagged',
+    #    'not-usertagged',
+    args.disable.extend(disabled_features)
+    for feature in args.enable:
+        if feature in args.disable:
+            args.disable.remove(feature)
 
-if args.verbose:
-    print(args)
+    if args.verbose:
+        print(args)
 
 
 def error(*objs):
@@ -351,8 +353,7 @@ def write_out(notes):
         try:
             out += ("  version: " + str(values['version']) + "\n")
         except KeyError:
-            if 'missing-version' not in args.disable:
-                print("There is no version set for the package " + pkg + ".")
+            pass
         if 'comments' in values:
             out += ("  comments: |\n")
             for line in values['comments'].strip().split('\n'):
diff --git a/clean-notes.py b/clean-notes.py
new file mode 120000
index 0000000..bd21cd8
--- /dev/null
+++ b/clean-notes.py
@@ -0,0 +1 @@
+clean-notes
\ No newline at end of file
diff --git a/edit-notes b/edit-notes
new file mode 100755
index 0000000..05c6a51
--- /dev/null
+++ b/edit-notes
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import argparse
+
+clean = __import__('clean-notes')
+
+parser = argparse.ArgumentParser()
+parser.add_argument('-f', '--fix-note', action='append', default=[])
+args = parser.parse_args()
+
+if __name__ == '__main__':
+    testedpkgs = clean.load_reproducible_status()
+    notes = clean.load_notes()
+    for fix in args.fix_note:
+        for package,data in notes.items():
+            if testedpkgs.get(package, {}).get('status', False) == 'reproducible':
+                issues = data.get('issues', [])
+                if fix in issues:
+                    issues.remove(fix)
+    clean.write_out(notes)
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-commits mailing list