summaryrefslogtreecommitdiff
path: root/clean_repo.py
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-22 01:04:55 -0700
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-22 01:04:55 -0700
commit65cb50c483621d6043685513531001a24228062b (patch)
treef0e8391b053c2e616312ba99d88271ccba4027c6 /clean_repo.py
parentbba8c33a039ec4d1e1d13f88304ba0aeb754b03e (diff)
Clean_repo deletes pending-files
Diffstat (limited to 'clean_repo.py')
-rwxr-xr-xclean_repo.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/clean_repo.py b/clean_repo.py
index 51e62d4..cc8e811 100755
--- a/clean_repo.py
+++ b/clean_repo.py
@@ -88,10 +88,12 @@ if __name__ == "__main__":
if args.database:
whitelisted=listado(args.whitelist_file)
pkgs=pkginfo_from_db(args.database)
- # remove_from_blacklist(args.database, blacklisted)
- mkpending(pkgs, args.pending_file,
- blacklisted, whitelisted)
+ pending_names=[pkg["name"] for pkg in
+ mkpending(pkgs, args.pending_file,
+ blacklisted, whitelisted)]
- if args.directory:
+ if args.directory and args.database:
+ cleanup_nonfree_in_dir(args.directory, (blacklisted + pending_names))
+ elif args.directory:
cleanup_nonfree_in_dir(args.directory, blacklisted)