diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-03-06 18:19:03 -0600 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-03-06 18:21:50 -0600 |
commit | 125df5a815e0a327739e928cc765ffdcf4bd0aea (patch) | |
tree | 125032ad0d017489adba849abff2ea6a87101a78 | |
parent | 58a67fb771fbbf433fe3ab2dafb9194e6f635f13 (diff) |
* Added function for cleanup dir
-rw-r--r-- | pato2.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -129,6 +129,12 @@ def remove_from_blacklist(repo_,arch_,info_,blacklist_): a = commands.getoutput(com_) if verbose: printf(a) +def cleanup_nonfree_in_dir(directory,blacklisted_names): + pkgs=pkginfo_from_files_in_dir(directory) + for package in pkgs: + if package["name"] in blacklisted_names: + os.remove(package["location"]) + def link(repo_,arch_,file_): """ Makes a link in the repo for the package """ cmd_="ln -f " + file_ + " " + repodir + "/" + repo_ + "/os/" + arch_ |