From 7cb14da25387cfb3c39e9064d2885e0246d9d183 Mon Sep 17 00:00:00 2001 From: Isaac David Date: Mon, 22 Aug 2016 16:25:50 -0500 Subject: remove some redundant logic from import-*-pkg scripts repo-remove handles both .db and .files at once, there's no need to use it again. A second time produces the following error, it was hiding behind the pipe to sed: ERROR: '${_repo}.files.tar.gz' doesn't have a valid database archive extension. --- db-import-archlinux-pkg | 5 +---- db-import-archlinuxarm-pkg | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/db-import-archlinux-pkg b/db-import-archlinux-pkg index aae7862..17fa38d 100755 --- a/db-import-archlinux-pkg +++ b/db-import-archlinux-pkg @@ -89,12 +89,9 @@ init() { # Remove blacklisted packages and count them # TODO capture all removed packages for printing on debug mode - msg2 "Removing blacklisted packages from %s database..." .db + msg2 "Removing blacklisted packages from %s and %s databases..." .db .files LC_ALL=C repo-remove "${db_file}" "${blacklist[@]}" \ |& sed -n 's/-> Removing/ &/p' - msg2 "Removing blacklisted packages from %s database..." .files - LC_ALL=C repo-remove "${files_file}" "${blacklist[@]}" \ - |& sed -n 's/-> Removing/ &/p' # Get db contents db=($(get_repo_content "${db_file}")) diff --git a/db-import-archlinuxarm-pkg b/db-import-archlinuxarm-pkg index 0268526..ef8c810 100755 --- a/db-import-archlinuxarm-pkg +++ b/db-import-archlinuxarm-pkg @@ -88,12 +88,9 @@ init() { # Remove blacklisted packages and count them # TODO capture all removed packages for printing on debug mode - msg2 "Removing blacklisted packages from %s database..." .db + msg2 "Removing blacklisted packages from %s and %s databases..." .db .files LC_ALL=C repo-remove "${db_file}" "${blacklist[@]}" \ |& sed -n 's/-> Removing/ &/p' - msg2 "Removing blacklisted packages from %s database..." .files - LC_ALL=C repo-remove "${files_file}" "${blacklist[@]}" \ - |& sed -n 's/-> Removing/ &/p' # Get db contents db=($(get_repo_content "${db_file}")) -- cgit v1.2.3