diff options
author | maxice8 <thinkabit.ukim@gmail.com> | 2019-03-14 20:05:08 -0300 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2019-03-18 11:35:08 +0100 |
commit | a4941da6cb1bc6715b6ead32d23e9b81ddbdb5aa (patch) | |
tree | cd920470ab27a56ad2f518a6300da2ab7d6c14af /xpcdeps | |
parent | d3d9690d4732187d0ee2ed68432ab09a81ab0982 (diff) | |
download | xtools-a4941da6cb1bc6715b6ead32d23e9b81ddbdb5aa.tar.gz xtools-a4941da6cb1bc6715b6ead32d23e9b81ddbdb5aa.tar.xz xtools-a4941da6cb1bc6715b6ead32d23e9b81ddbdb5aa.zip |
xpcdeps: More fixes.
- Use pwd -P in case void-packages is a symlink - Match all files ending with .xbps to avoid repodata files - Strip -musl from matched files to not break xbps-uhelper getpkgname - create empty .pc to avoid running extra functions - remove debugging exit 0 - Check if there are no files matched Closes: #127 [via git-merge-pr]
Diffstat (limited to 'xpcdeps')
-rwxr-xr-x | xpcdeps | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xpcdeps b/xpcdeps index e01a2a4..a7fe5d7 100755 --- a/xpcdeps +++ b/xpcdeps @@ -29,21 +29,23 @@ create_pcfile() { } grab_local() { - if [ "$(xdistdir)" != "$PWD" ]; then + if [ "$(xdistdir)" != "$(pwd -P)" ]; then return 0 fi branch=$(git symbolic-ref -q --short HEAD 2>/dev/null) - for pkg in hostdir/binpkgs/$branch/* ; do + for pkg in hostdir/binpkgs/$branch/*.xbps ; do + [ "$pkg" = "hostdir/binpkgs/$branch/*.xbps" ] && continue pkg="${pkg##*/}" - pkg="$(xbps-uhelper getpkgname "$pkg")" + pkg="$(echo "$pkg" | sed 's|-musl||g')" pcfile="$( xbps-query -i \ --repository=hostdir/binpkgs/"$branch" \ - -f "$pkg" \ + -f "$(xbps-uhelper getpkgname "$pkg")" \ | grep "/$1.pc" )" if [ -n "$pcfile" ] ; then printf "%s %s\\n" "$pkg" "$pcfile" + touch "$tempdir/$1.pc" fi done | create_pcfile "$1" } @@ -81,8 +83,6 @@ for arg; do [ -f "$tempdir/$arg.pc" ] || grab_requires "$arg" - exit 0 - if [ -f "$tempdir/$arg.pc" ]; then sanitize_pcfile "$tempdir/$arg.pc" | get_package_from_requires fi |