X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-contents;h=ff607fbb0b24726e84767aa7d461f347f92bdd4a;hb=ae7d62320daeda36f7e5d5577b7752230dd6f50b;hp=6cdd485d4562397bb10baffac3334fe5d156c40a;hpb=11e059255e52892cabe2ba4179ef832f42a37bf4;p=zpackage diff --git a/zpm-contents b/zpm-contents index 6cdd485..ff607fb 100755 --- a/zpm-contents +++ b/zpm-contents @@ -7,8 +7,9 @@ pkgonly=0 quiet=0 config=include showsoname=0 +status= -while getopts f:qlncCL opt; do +while getopts f:qlncCLI opt; do case $opt in f) pkgfile="$OPTARG" ;; l) long=1 ;; @@ -17,6 +18,7 @@ while getopts f:qlncCL opt; do c) config=only ;; C) config=exclude ;; L) showsoname=1 ;; + I) status=installed esac done shift $((OPTIND - 1)) @@ -80,7 +82,7 @@ cols=${cols%,} fi printf "else path end as path\n" fi - printf 'from packagefiles_pkgid PF left join elflibraries EL on EL.file = PF.hash\nwhere true\n' + printf 'from packagefiles_status PF left join elflibraries EL on EL.file = PF.hash\nwhere true\n' if [ -n "$globlist" ]; then printf "and (%s)\n" "$globlist" fi @@ -91,6 +93,9 @@ cols=${cols%,} only) printf "and configuration = 1\n" ;; exclude) printf "and configuration = 0\n" ;; esac + if [ -n "$status" ]; then + printf "and status = '%s'\n" "$status" + fi printf 'order by pkgid,path\n' printf ';\n' } | zpm shell $pkgfile