xbps-src: introduce a new target: "sort-dependencies".

This expects a variable argument list with package names that will be
returned to stdout topologically sorted.

$ ./xbps-src sort-dependencies libarchive-devel liblzma-devel libxbps zlib-devel bzip2-devel
bzip2
xz
zlib
libarchive
xbps
This commit is contained in:
Juan RP 2015-08-16 10:45:19 +02:00
parent 1779dabd7d
commit cef388f07b
2 changed files with 23 additions and 10 deletions

View file

@ -103,6 +103,10 @@ show-repo-updates
show-sys-updates
Prints the list of oudated packages in your system.
sort-dependencies <pkg> <pkgN+1> ...
Given a list of packages specified as additional arguments, a sorted dependency
list will be returned to stdout.
update-bulk
Rebuilds all packages in the system repositories that are outdated.
@ -381,7 +385,7 @@ while getopts "a:CEfgGhH:Ij:Lm:No:r:tV" opt; do
done
shift $(($OPTIND - 1))
[ $# -eq 0 -o $# -gt 3 ] && usage && exit 1
[ $# -eq 0 ] && usage && exit 1
umask 022
@ -691,6 +695,9 @@ case "$XBPS_TARGET" in
show-sys-updates)
bulk_build -i
;;
sort-dependencies)
bulk_sortdeps ${@/$XBPS_TARGET/}
;;
update-bulk)
bulk_update
;;