summaryrefslogtreecommitdiff
path: root/db-check-nonfree-in-db
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-04-17 11:50:08 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-04-17 11:50:08 -0400
commitafa918c0ea0e773acb8df5136f7b76e75c03dea6 (patch)
treefb6fc07612dadc92c0374eff054cb011886faaf5 /db-check-nonfree-in-db
parentbf2cb9784fe726b163667aaeab541cf7ae7f21a9 (diff)
mv db-check-nonfree{,-in-db}
Diffstat (limited to 'db-check-nonfree-in-db')
-rwxr-xr-xdb-check-nonfree-in-db28
1 files changed, 28 insertions, 0 deletions
diff --git a/db-check-nonfree-in-db b/db-check-nonfree-in-db
new file mode 100755
index 0000000..3e6b273
--- /dev/null
+++ b/db-check-nonfree-in-db
@@ -0,0 +1,28 @@
+#!/usr/bin/env python2
+#-*- encoding: utf-8 -*-
+from filter import *
+import argparse
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(
+ prog="db-check-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]))