You are not logged in.
The title is not really fitting, if somebody has a better suggestion I am happy to update it.
I was wondering if there already exists a tool that provides a topological sorting on a certain set of packages/PKGBUILDs. I sometimes have this problem when multiple packages that I build with makepkg recieve updates. Simple example: I want to build gnutls and gnupg. gnutls is a dependency of gnupg so I should build it first. The algorithms for such a problem are well known and more or less easy to implement, I am just asking if somebody already did the work.
Last edited by FlowIt (2017-06-13 20:17:12)
Offline
For packages in the official repos...
man pactree
For packages in the AUR you can use aurchain (part of the aurutils package).
Last edited by Slithery (2017-06-11 17:09:55)
Offline
Would be great if pactree had an option to offer linear, easily parsable output. The tree is nice to get an informative view on the dependencies, but is ill suited to be used in a script.
Offline
Would be great if pactree had an option to offer linear, easily parsable output. The tree is nice to get an informative view on the dependencies, but is ill suited to be used in a script.
-l, --linear Prints package names at the start of each line, one per line.
Last edited by 2ManyDogs (2017-06-11 18:04:59)
Offline
Would be great if pactree had an option to offer linear, easily parsable output. The tree is nice to get an informative view on the dependencies, but is ill suited to be used in a script.
There's "pactree -l" and "pactree -u".
Offline
Ok, this is a bit embarassing. Missed it twice while reading the man page. But the linear option does not provide a topological sorting.
Offline
That's why slithery suggested reading `man pactree`: it has options. (edit: too slow)
-u does seem to give the topological order, admittedly in reverse. But tac will fix that.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
-u does seem to give the topological order, admittedly in reverse. But tac will fix that.
No, the gnupg example will show it does not.
$ pactree -l -u gnupg
gnupg
libassuan
libgpg-error
glibc
linux-api-headers
tzdata
filesystem
bash
readline
ncurses
gcc-libs
libgcrypt
npth
gnutls
libtasn1
zlib
nettle
gmp
p11-kit
libffi
libunistring
sqlite
pinentry
libcap
attr
libksba
For example, sqlite depends on readline, too, but is printed after readline.
Offline
aurutils - helper tools for the aur is a modular AUR helper with reusable bits. You can use `aurqueue` to solve dependencies via their .SRCINFO files, powered by tsort. See the aurutils(7) documentation, it is not at all limited to AUR packages.
Last edited by eschwartz (2017-06-11 19:49:22)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
aurqueue is exactly what I was looking for, thanks. Solved!
Offline