You are not logged in.
I'd like to check a list of packages against the base-devel group including dependencies. Is there a tool I can use to do it to avoid manual inspection?
Note - this is intended to be a metapackage so nothing will be build/installed beyond the deps (prerequisites for building openwrt cross-compiler).
depends=(
asciidoc bash binutils bzip2 flex gawk gcc gettext git help2man intltool libelf
libxslt make ncurses openssl patch perl-extutils-makemaker python2 time unzip
util-linux wget zlib zlib
)
Last edited by graysky (2021-02-05 10:18:59)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I don't understand the meaning of your sentence. What does it mean to "check a list of packages against the base-devel group including dependencies"?
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Assuming you mean you just want to filter out members of base-devel from that list, this would do it:
printf "%s\n" ${depends[@]} | sort | comm -23 - <(pacman -Sgq base-devel | sort)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I think base devel including dependencies of currently resolves to
acl
archlinux-keyring
attr
audit
autoconf
automake
bash
binutils
bison
bzip2
ca-certificates
ca-certificates-mozilla
ca-certificates-utils
coreutils
curl
db
diffutils
e2fsprogs
elfutils
expat
fakeroot
file
filesystem
findutils
flex
gawk
gc
gcc
gcc-libs
gdbm
gettext
glib2
glibc
gmp
gnupg
gnutls
gpgme
grep
groff
guile
gzip
iana-etc
icu
keyutils
krb5
less
libarchive
libassuan
libcap
libcap-ng
libcroco
libelf
libffi
libgcrypt
libgpg-error
libidn2
libksba
libldap
libmicrohttpd
libmpc
libnghttp2
libp11-kit
libpsl
libsasl
libseccomp
libsecret
libssh2
libtasn1
libtirpc
libtool
libunistring
libxcrypt
libxml2
linux-api-headers
lz4
m4
make
mpfr
ncurses
nettle
npth
openssl
p11-kit
pacman
pacman-mirrorlist
pam
pambase
patch
pcre
perl
pinentry
pkgconf
readline
sed
shadow
sqlite
sudo
systemd-libs
tar
texinfo
tzdata
util-linux
util-linux-libs
which
xz
zlib
zstd
The question is what is the easiest way to generate this list. I used pacstrap base-devel then grepped from the generated pacman.log but there has to be a much simpler way.
Offline
There should be no need to get the dependencies of base-devel members. If a package depends on something that is not in base-devel, but happens to currently be a dependency of a member of base-devel, the new package must still list it as a dependency.
But if you really want to list all of base-devel and all dependencies of all members of base devel (recursively) then this will do it:
pacman -Sgq base-devel | while read pkg; do pactree -lsu $pkg; done | sort -u
But don't use that list for removing dependencies from PKGBUILDs.
Last edited by Trilby (2021-02-05 02:18:44)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I don't understand the meaning of your sentence. What does it mean to "check a list of packages against the base-devel group including dependencies"?
Since all members of base-devel are an assumed dependency of packages in the AUR, I want to check a list of packages against that set to only require ones that are not implicitly on the list and those that would be pulled in by a dependency of another one.
I usually use namcap, but I want to provide a metapackage of dependencies. In this case, https://aur.archlinux.org/packages/openwrt-devel/
I think these are all that are needed:
depends=(
bash bzip2 git libelf libxslt ncurses openssl python2 time unzip
util-linux wget zlib
)
Assuming you mean you just want to filter out members of base-devel from that list, this would do it:
printf "%s\n" ${depends[@]} | sort | comm -23 - <(pacman -Sgq base-devel | sort)
The list I manually generated above matches the output of this so I think it is the right answer based on other discussions above as well.
Thanks all.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Where do dependencies come into this?
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Since all members of base-devel are an assumed dependency of packages in the AUR, I want to check a list of packages against that set to only require ones that are not implicitly on the list and those that would be pulled in by a dependency of another one.
Please go back and read my previous post. You are right that you can / should check your packages dependencies against base-devel and not list members of base-devel as dependencies of your package. But you must still list dependencies of your package that are not members of base-devel - regardless of whether they may currently and only on default configurations be pulled in by base-devel. In other words, you cannot assume that dependencies of members of base-devel will be installed. List those if they are needed.
If your package depends on A and B, and A is in base-devel, and the current implementation of A depends on B, but B is not in base-devel, then your package must list B as a dependency: do not filter it out.
Last edited by Trilby (2021-02-07 06:08:41)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Anyway, members of base-devel are only an assumed makedepends=() of packages. They are not an assumed depends=().
Score one for imprecise language. I have no idea whether graysky is actually confused here, or merely typoing this / being hasty. There is some confusion, to be sure, since a metapackage full of build dependencies was *also* mentioned.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
DOH. I had overlooked the make-depends/depends distinction too. So there are two big problems here.
The good news is the original question on how to filter that list becomes much much easier. Answer: don't.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Anyway, members of base-devel are only an assumed makedepends=() of packages. They are not an assumed depends=().
Score one for imprecise language. I have no idea whether graysky is actually confused here, or merely typoing this / being hasty. There is some confusion, to be sure, since a metapackage full of build dependencies was *also* mentioned.
Yeah, I too missed that distinction re: makedepends and implicate base-devel ::face palm:: The goal is to have it pull in everything a user would need to build openwrt on Arch. So all dependencies including those in base-devel should be listed after-all.
Last edited by graysky (2021-02-07 11:15:45)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline