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:
parent
1779dabd7d
commit
cef388f07b
2 changed files with 23 additions and 10 deletions
|
@ -10,17 +10,10 @@ bulk_getlink() {
|
|||
echo $p
|
||||
}
|
||||
|
||||
bulk_build() {
|
||||
bulk_sortdeps() {
|
||||
local _pkgs _pkg pkgs pkg found f x tmpf
|
||||
|
||||
if [ "$XBPS_CROSS_BUILD" ]; then
|
||||
source ${XBPS_COMMONDIR}/cross-profiles/${XBPS_CROSS_BUILD}.sh
|
||||
export XBPS_ARCH=${XBPS_TARGET_ARCH}
|
||||
fi
|
||||
if ! command -v xbps-checkvers &>/dev/null; then
|
||||
msg_error "xbps-src: cannot find xbps-checkvers(8) command!\n"
|
||||
fi
|
||||
_pkgs=$(xbps-checkvers ${1} --distdir=$XBPS_DISTDIR | awk '{print $2}')
|
||||
_pkgs="$@"
|
||||
# Iterate over the list and make sure that only real pkgs are
|
||||
# added to our pkglist.
|
||||
for pkg in ${_pkgs}; do
|
||||
|
@ -60,6 +53,19 @@ bulk_build() {
|
|||
rm -f $tmpf
|
||||
}
|
||||
|
||||
bulk_build() {
|
||||
|
||||
if [ "$XBPS_CROSS_BUILD" ]; then
|
||||
source ${XBPS_COMMONDIR}/cross-profiles/${XBPS_CROSS_BUILD}.sh
|
||||
export XBPS_ARCH=${XBPS_TARGET_ARCH}
|
||||
fi
|
||||
if ! command -v xbps-checkvers &>/dev/null; then
|
||||
msg_error "xbps-src: cannot find xbps-checkvers(8) command!\n"
|
||||
fi
|
||||
|
||||
bulk_sortdeps "$(xbps-checkvers ${1} --distdir=$XBPS_DISTDIR | awk '{print $2}')"
|
||||
}
|
||||
|
||||
bulk_update() {
|
||||
local args="$1" pkgs f
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue