On 5/6/19 10:10 AM, Jelle van der Waa wrote: > From: Jelle van der Waa <[email protected]> > > finddeps depends on a no longer existing ABS tree.
finddeps does not depend on the discontinued `abs` tool. It does work
fine with an svn-packages/svn-community checkout, or via the svntogit
exported tree.
$ cd svn-packages
$ finddeps glibc
./bzip2/repos/core-x86_64 (depends)
./bzip2/trunk (depends)
./pacman/trunk (depends)
./pacman/repos/core-x86_64 (depends)
./c-ares/repos/extra-x86_64 (depends)
./c-ares/trunk (depends)
./patch/repos/core-x86_64 (depends)
./patch/trunk (depends)
./libgpg-error/repos/core-x86_64 (depends)
./libgpg-error/trunk (depends)
./libnghttp2/repos/core-x86_64 (depends)
./libnghttp2/trunk (depends)
./libksba/trunk (depends)
./libksba/repos/core-x86_64 (depends)
./mkinitcpio-busybox/repos/core-x86_64 (depends)
./mkinitcpio-busybox/trunk (depends)
> This data can also be queried via archweb.
This is true. However, finddeps also works fine with any arbitrary
custom directory which contains subdirectories (to any recursive level)
of PKGBUILD files. For example, a tree full of PKGBUILDs acquired from
the AUR.
$ cd ~/git/pkgbuilds/
$ finddeps git
./calibre-git (makedepends)
./fanficfare-git (makedepends)
./git-extras-git (depends)
./git-extras (depends)
./kindletool-git (makedepends)
./lastpass-cli-git (makedepends)
./qbittorrent-git (makedepends)
./rapydscript-ng-git (makedepends)
./sigil-git (makedepends)
./vim-endwise-git (makedepends)
./vim-eunuch-git (makedepends)
./vim-flagship-git (makedepends)
./vim-gitgutter-git (depends)
./vim-sensible-git (makedepends)
./glibc-git (makedepends)
./pacman-git (makedepends)
./xapps-git (makedepends)
./cinnamon-desktop-git (makedepends)
./muffin-git (makedepends)
./cinnamon-settings-daemon-git (makedepends)
./cjs-git (makedepends)
./cinnamon-screensaver-git (makedepends)
./cinnamon-session-git (makedepends)
./cinnamon-git (makedepends)
./lib32-glibc-git (makedepends)
> ---
> .gitignore | 1 -
> Makefile | 1 -
> finddeps.in | 41 -----------------------------------------
> zsh_completion.in | 6 +-----
> 4 files changed, 1 insertion(+), 48 deletions(-)
> delete mode 100644 finddeps.in
>
> diff --git a/.gitignore b/.gitignore
> index b63587b..49afce6 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -6,7 +6,6 @@ archrelease
> bash_completion
> checkpkg
> commitpkg
> -finddeps
> lddd
> makechrootpkg
> mkarchroot
> diff --git a/Makefile b/Makefile
> index ba2d3e4..15c2786 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -10,7 +10,6 @@ IN_PROGS = \
> archrelease \
> archbuild \
> lddd \
> - finddeps \
> rebuildpkgs \
> find-libdeps \
> crossrepomove\
> diff --git a/finddeps.in b/finddeps.in
> deleted file mode 100644
> index 2a085e5..0000000
> --- a/finddeps.in
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -#!/bin/bash
> -#
> -# finddeps - find packages that depend on a given depname
> -#
> -# License: Unspecified
> -
> -m4_include(lib/common.sh)
> -
> -match=$1
> -
> -if [[ -z $match ]]; then
> - echo 'Usage: finddeps <depname>'
> - echo ''
> - echo 'Find packages that depend on a given depname.'
> - echo 'Run this script from the top-level directory of your ABS tree.'
> - echo ''
> - exit 1
> -fi
> -
> -find . -type d | while read -r d; do
> - if [[ -f "$d/PKGBUILD" ]]; then
This does not depend on any sort of organizational structure.
> - pkgname=() depends=() makedepends=() optdepends=()
> - # shellcheck source=PKGBUILD.proto
> - . "$d/PKGBUILD"
> - for dep in "${depends[@]}"; do
> - # lose the version comparator, if any
> - depname=${dep%%[<>=]*}
> - [[ $depname = "$match" ]] && echo "$d (depends)"
> - done
> - for dep in "${makedepends[@]}"; do
> - # lose the version comparator, if any
> - depname=${dep%%[<>=]*}
> - [[ $depname = "$match" ]] && echo "$d (makedepends)"
> - done
> - for dep in "${optdepends[@]/:*}"; do
> - # lose the version comaparator, if any
> - depname=${dep%%[<>=]*}
> - [[ $depname = "$match" ]] && echo "$d (optdepends)"
> - done
> - fi
> -done
> diff --git a/zsh_completion.in b/zsh_completion.in
> index 45429bd..5f2111f 100644
> --- a/zsh_completion.in
> +++ b/zsh_completion.in
> @@ -1,4 +1,4 @@
> -#compdef archbuild archco arch-nspawn archrelease commitpkg finddeps
> makechrootpkg mkarchroot rebuildpkgs extrapkg=commitpkg corepkg=commitpkg
> testingpkg=commitpkg stagingpkg=commitpkg communitypkg=commitpkg
> community-testingpkg=commitpkg community-stagingpkg=commitpkg
> multilibpkg=commitpkg multilib-testingpkg=commitpkg
> extra-x86_64-build=archbuild testing-x86_64-build=archbuild
> staging-x86_64-build=archbuild multilib-build=archbuild
> multilib-testing-build=archbuild multilib-staging-build=archbuild
> kde-unstable-x86_64-build=archbuild gnome-unstable-x86_64-build=archbuild
> communityco=archco
> +#compdef archbuild archco arch-nspawn archrelease commitpkg makechrootpkg
> mkarchroot rebuildpkgs extrapkg=commitpkg corepkg=commitpkg
> testingpkg=commitpkg stagingpkg=commitpkg communitypkg=commitpkg
> community-testingpkg=commitpkg community-stagingpkg=commitpkg
> multilibpkg=commitpkg multilib-testingpkg=commitpkg
> extra-x86_64-build=archbuild testing-x86_64-build=archbuild
> staging-x86_64-build=archbuild multilib-build=archbuild
> multilib-testing-build=archbuild multilib-staging-build=archbuild
> kde-unstable-x86_64-build=archbuild gnome-unstable-x86_64-build=archbuild
> communityco=archco
> # License: Unspecified
>
> m4_include(lib/valid-tags.sh)
> @@ -29,10 +29,6 @@ _commitpkg_args=(
> '1:commit_msg'
> )
>
> -_finddeps_args=(
> - '1:packages:_devtools_completions_all_packages'
> -)
> -
> _makechrootpkg_args=(
> '-I[Install a package into the working copy]:target:_files -g
> "*.pkg.tar.*(.)"'
> '-c[Clean the chroot before building]'
>
--
Eli Schwartz
Bug Wrangler and Trusted User
signature.asc
Description: OpenPGP digital signature
