From 65cb50c483621d6043685513531001a24228062b Mon Sep 17 00:00:00 2001 From: Joshua Ismael Haase Hernández Date: Fri, 22 Apr 2011 01:04:55 -0700 Subject: Clean_repo deletes pending-files --- clean_repo.py | 10 ++++++---- repo-update | 10 ++++++---- 2 files changed, 12 insertions(+), 8 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) diff --git a/repo-update b/repo-update index 88ddda3..8ad5aef 100755 --- a/repo-update +++ b/repo-update @@ -6,8 +6,9 @@ source $(dirname $0)/local_config source $(dirname $0)/libremessages for repo in ${ARCHREPOS[@]}; do + msg "Syncing ${repo}" for arch in ${ARCHARCHES[@]} 'any'; do - msg "Syncing ${repo} ${arch}" + msg2 "${repo} ${arch}" # makes a file containing rsync output for filter.py ${rsync_list_command} \ rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ @@ -28,18 +29,19 @@ for repo in ${ARCHREPOS[@]}; do ${repodir}/staging/${repo}/ done for arch in ${ARCHARCHES[@]}; do - msg "Cleaning $repo $arch" + msg2 "Making pending list for $repo $arch" # if there is a db in repo (db is created on rsync) if [ -r ${repodir}/staging/${repo}/os/${arch}/${repo}${DBEXT} ]; then # clean_repo makes pending list with files on db and remove # packages from db clean_repo.py -k ${blacklist} -w ${whitelist} \ -p ${docs_dir}/pending-${repo}.txt \ - -b ${repodir}/staging/${repo}/${repo}${DBEXT} + -b ${repodir}/staging/${repo}/${repo}${DBEXT} \ + -d ${repodir}/stagging/${repo} fi done # if some nonfree files got pass the filter this command delete them - msg "Fallback cleaning repo" + msg2 "Fallback cleaning repo" python clean_repo.py -k ${blacklist} -d ${repodir}/staging/${repo} done -- cgit v1.2.3-54-g00ecf