Commit 31faa0c8 authored by Ram-Z's avatar Ram-Z
Browse files

Search for pkgs in current CHROOT only

1. the list was populated from all chroots
2. repeated pkgs were checked in the repo given on the commandline
3. repeated sigs were checked in all repos
parent 8b0c7bdb
......@@ -56,7 +56,7 @@ done
get_upload_list() {
# noglob because apparently it is very difficult to generate find arguments and quote them properly
upload_list=( $(set -o noglob; find ~/_repo/ -name '*.pkg.tar.*' \( $(find_args ${args[@]}) \) -print) )
upload_list=( $(set -o noglob; find ~/_repo/$CHROOT -name '*.pkg.tar.*' \( $(find_args ${args[@]}) \) -print) )
if [[ -z "$upload_list" ]] ; then
error "No packages found in «_repo/$CHROOT», there's nothing to upload"
exit 1
......@@ -166,7 +166,7 @@ rm_old_pkgs() {
local -a duplicates
local -a repeated=( $(printf "%s\n" "${pkgnames[@]}" | sort | uniq --repeated) )
for p in ${repeated[@]}; do
local -a pkg=( $(ls /chakra/_repo/$repo/$p*z) )
local -a pkg=( $(ls /chakra/_repo/$CHROOT/$p*z) )
# drop last element
unset pkg[${#pkg[@]}-1]
......@@ -179,7 +179,7 @@ rm_old_pkgs() {
local -a pkgname_sigs=( ${filename_sigs[@]%-*-*-*} )
local -a repeated_sigs=( $(printf "%s\n" "${pkgname_sigs[@]}" | sort | uniq --repeated) )
for p in ${repeated_sigs[@]}; do
local -a sign=( $(ls /chakra/_repo/*/$p*sig) )
local -a sign=( $(ls /chakra/_repo/$CHROOT/$p*sig) )
# drop last element
unset sign[${#sign[@]}-1]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment