xbps-src: massive rewrite of builddeps resolving code.
This speeds up the process of resolving builddeps with XBPS_PREFER_BINPKG_DEPS enabled and disabled by ~15% aproximately. This fixes also some bugs I've found while building a massive rebuild of all packages with XBPS_PREFER_BINPKG_DEPS enabled.
This commit is contained in:
parent
a09089a9b0
commit
5d7873a5b2
5 changed files with 99 additions and 82 deletions
|
@ -1,5 +1,5 @@
|
|||
#-
|
||||
# Copyright (c) 2008-2010 Juan Romero Pardines.
|
||||
# Copyright (c) 2008-2011 Juan Romero Pardines.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
@ -183,11 +183,8 @@ unstow_pkg_real()
|
|||
# If it's a metapkg, do nothing.
|
||||
:
|
||||
elif [ ! -f ${XBPS_PKGMETADIR}/${pkgname}/flist ]; then
|
||||
# If flist not found, perhaps the pkg has been installed via
|
||||
# xbps-bin, so try to remove it.
|
||||
${XBPS_BIN_CMD} -pyf remove ${pkgname} || \
|
||||
msg_error "${pkgname}: failed to remove!\n"
|
||||
return $?
|
||||
msg_warn "$pkgname wasn't installed from source!\n"
|
||||
return 0
|
||||
elif [ ! -w ${XBPS_PKGMETADIR}/${pkgname}/flist ]; then
|
||||
msg_error "$pkgname cannot be removed (permission denied).\n"
|
||||
elif [ -s ${XBPS_PKGMETADIR}/${pkgname}/flist ]; then
|
||||
|
@ -214,7 +211,7 @@ unstow_pkg_real()
|
|||
|
||||
run_func post_remove
|
||||
# Remove metadata dir.
|
||||
rm -rf $XBPS_PKGMETADIR/$pkgname
|
||||
[ -d $XBPS_PKGMETADIR/$pkgname ] && rm -rf $XBPS_PKGMETADIR/$pkgname
|
||||
|
||||
# Unregister pkg from plist file.
|
||||
$XBPS_PKGDB_CMD unregister $pkgname $ver
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue