From e7b53041d08c088f50121a28fa75ac527a49b3ce Mon Sep 17 00:00:00 2001 From: merakor Date: Mon, 19 Jul 2021 12:20:22 +0000 Subject: pkg_query_meta: accept full path as well as package names FossilOrigin-Name: d0203f624858114c808537c5b1ac594d13c32bdd097b463c46a951c1390af75e --- src/cpt-lib.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 4675d19..407fd82 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -2000,8 +2000,11 @@ pkg_gentree() ( pkg_query_meta() { # Query the 'meta' file of the given meta package. If there is no meta file, # or the key being queried is unavailable, the function will return with - # error. - repo_dir=$(pkg_find "$1") + # error. Full path can be specified instead of package names. + case $1 in + */*) repo_dir=$1 ;; + *) repo_dir=$(pkg_find "$1") + esac [ -f "$repo_dir/meta" ] || return while IFS=': ' read -r key val; do case $key in -- cgit v1.2.3