From 99ce8340dc7e33e550efb8fd6f466ad7da5ea456 Mon Sep 17 00:00:00 2001 From: Erick Cafferata Date: Thu, 17 Jan 2019 11:23:56 -0500 Subject: replace die() for log_fatal() --- asp.in | 2 +- package.inc.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asp.in b/asp.in index 69c3bdc..25bb7b7 100644 --- a/asp.in +++ b/asp.in @@ -156,7 +156,7 @@ dump_packages() { dumpfn=remote_get_tracked_refs ;; *) - die 'internal error: invalid dump type: "%s"' "$1" + log_fatal 'BUG: invalid dump type: "%s"' "$1" ;; esac diff --git a/package.inc.sh b/package.inc.sh index 1ae9a5b..b4f49a5 100644 --- a/package.inc.sh +++ b/package.inc.sh @@ -74,7 +74,7 @@ package_log() { logargs=() ;; *) - die 'internal error: unknown log method: %s' "$method" + log_fatal 'BUG: unknown log method: %s' "$method" ;; esac -- cgit v1.2.3-70-g09d2 From 36732e5441313234068dd49b3494aea62f3a6b4b Mon Sep 17 00:00:00 2001 From: Erick Cafferata Date: Wed, 16 Jan 2019 09:06:44 -0500 Subject: fix parse issue in package_get_repos_with_arch() - Error happens with repositories with '-' in the name. ie: community-testing, the '-' string gets parsed wrong (repo=community,arch=testing-x86_64). - This patch will hold up at least until an arch with a '-' in the name appears. --- package.inc.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.inc.sh b/package.inc.sh index b4f49a5..7af7a82 100644 --- a/package.inc.sh +++ b/package.inc.sh @@ -177,7 +177,9 @@ package_get_repos_with_arch() { pkgname=$1 while read -r path; do - IFS=/- read -r _ repo arch <<<"$path" + path=${path##*/} + repo=${path%-*} + arch=${path##*-} printf '%s %s\n' "$repo" "$arch" done < <(git ls-tree --name-only "remotes/$remote/packages/$pkgname" repos/) } -- cgit v1.2.3-70-g09d2