summaryrefslogtreecommitdiff
path: root/db-list-nonfree.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 21:33:20 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 21:33:20 -0400
commitaae3b0a2490d65832547f29327f9e8828442a48d (patch)
tree29b554ba243e1d97e3104c6c18d9838d6c4fc250 /db-list-nonfree.py
parentd433fbd1da44acdf3dd50abce428fe57912f9fa7 (diff)
cleanup:
- move some config into config.local.* - `mv createrepos db-init` - `mv {,db-}check-package-libraries.py` - `mv `list_nonfree_in_db.py db-list-nonfree.py` - `rm abslibre`: To be replaced by XBS+update abs tarballs script - `rm create-repo mkrepo`: Both did the same thing, just fancy `mkdir` - `rm `testing2x`: Just use db-move.
Diffstat (limited to 'db-list-nonfree.py')
-rwxr-xr-xdb-list-nonfree.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/db-list-nonfree.py b/db-list-nonfree.py
new file mode 100755
index 0000000..4e1b164
--- /dev/null
+++ b/db-list-nonfree.py
@@ -0,0 +1,28 @@
+#! /usr/bin/python2
+#-*- encoding: utf-8 -*-
+from filter import *
+import argparse
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(
+ prog="nonfree_in_db",
+ description="Cleans nonfree files on repo",)
+
+ parser.add_argument("-k", "--blacklist-file", type=str,
+ help="File containing blacklisted names",
+ required=True,)
+
+ parser.add_argument("-b", "--database", type=str,
+ help="dabatase to clean",
+ required=True,)
+
+ args=parser.parse_args()
+
+ if not (args.blacklist_file and args.database):
+ parser.print_help()
+ exit(1)
+
+ blacklist=listado(args.blacklist_file)
+ pkgs=get_pkginfo_from_db(args.database)
+
+ print(" ".join([pkg["name"] for pkg in pkgs if pkg["name"] in blacklist]))