[arch-projects] [devtools] [PATCH] Remove finddeps tool
From: Jelle van der Waa <jelle@vdwaa.nl> finddeps depends on a no longer existing ABS tree. This data can also be queried via archweb. --- .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 - 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]' -- 2.21.0
On 5/6/19 10:10 AM, Jelle van der Waa wrote:
From: Jelle van der Waa <jelle@vdwaa.nl>
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
On Mon, 6 May 2019 at 15:10, Jelle van der Waa <jelle@vdwaa.nl> wrote:
From: Jelle van der Waa <jelle@vdwaa.nl>
finddeps depends on a no longer existing ABS tree. This data can also be queried via archweb. ---
Out of curiosity: AFAICT all the information is already in the local DB, so theoretically pacman can present this. Yet I cannot find anything in the manual. Is the feature missing, has it been proposed and rejected before? Thanks Emil
On 5/6/19 12:10 PM, Emil Velikov via arch-projects wrote:
On Mon, 6 May 2019 at 15:10, Jelle van der Waa <jelle@vdwaa.nl> wrote:
From: Jelle van der Waa <jelle@vdwaa.nl>
finddeps depends on a no longer existing ABS tree. This data can also be queried via archweb. ---
Out of curiosity: AFAICT all the information is already in the local DB, so theoretically pacman can present this. Yet I cannot find anything in the manual. Is the feature missing, has it been proposed and rejected before?
pacman -Sii pkgname => Required By Does not cover makedepends (these do exist in the syncdb but won't be properly exposed to libalpm until the next pacman release). Does not cover packages that have not been built yet. -- Eli Schwartz Bug Wrangler and Trusted User
On 05/06/19 at 12:28pm, Eli Schwartz via arch-projects wrote:
On 5/6/19 12:10 PM, Emil Velikov via arch-projects wrote:
On Mon, 6 May 2019 at 15:10, Jelle van der Waa <jelle@vdwaa.nl> wrote:
From: Jelle van der Waa <jelle@vdwaa.nl>
finddeps depends on a no longer existing ABS tree. This data can also be queried via archweb. ---
Out of curiosity: AFAICT all the information is already in the local DB, so theoretically pacman can present this. Yet I cannot find anything in the manual. Is the feature missing, has it been proposed and rejected before?
pacman -Sii pkgname => Required By
Does not cover makedepends (these do exist in the syncdb but won't be properly exposed to libalpm until the next pacman release).
Does not cover packages that have not been built yet.
Ah true, consider this patch dropped.
participants (3)
-
Eli Schwartz
-
Emil Velikov
-
Jelle van der Waa