Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove useless make dependencies n°2 #3895

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

noraj
Copy link
Contributor

@noraj noraj commented Jul 3, 2023

https://wiki.archlinux.org/index.php/PKGBUILD#makedepends

The dependencies required should be the minimum and so eliminating useless dependencies.

Note: The meta-package base-devel is assumed to be already installed when building with makepkg. Members of this group should not be included in makedepends array.

Tip: The following can be used to check whether a particular package is either in the base-devel group or is pulled in by a member of the group:

LC_ALL=C pacman -Si $(pactree -rl package) 2>/dev/null | grep -q "^Groups *:.*base-devel"

Commands to search for useless deps:

grep -r "^makedepends=(" packages | grep -E "'(autoconf|automake|binutils|bison|fakeroot|file|findutils|flex|gawk|gcc|gettext|grep|groff|gzip|libtool|m4|make|pacman|patch|pkgconf|pkg-config|sed|sudo|texinfo|which)'"

Notes:

  • glibc is already pulled by some members of the base-devel group, maybe other sub-depencies may not be caught by the regexp
  • pkg-config is an alias for pkgconf so other aliases may not be listed on the regexp
  • with the example regexp, when makedepends is splitted on multiple lines, extra line won't be caught

duplicates should be removed too:

The packages in the depends array are implicitly required to build the package, they should not be duplicated here.

@noraj noraj requested a review from noptrix as a code owner July 3, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant