hooks/gen-pkg: do not autogenerate dbg pkg if this exists already.

This will be required by an upcoming change to linuxX.X by @chneukirchen
to build a -dbg pkg; and we cannot generate it automatically for now.

This avoids a double pkg creation noticed by @chneukirchen.
This commit is contained in:
Juan RP 2015-02-05 11:30:32 +01:00
parent e123fbb83d
commit 5c95087605
1 changed files with 10 additions and 2 deletions

View File

@ -120,7 +120,7 @@ genpkg() {
hook() {
local arch= binpkg= repo= _pkgver= _desc= _pkgn= _pkgv= _provides= \
_replaces= _reverts=
_replaces= _reverts= f= found_dbg_subpkg=
if [ -n "$noarch" ]; then
arch=noarch
@ -155,7 +155,15 @@ hook() {
done
# Generate -dbg pkg.
if [ -d "${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/${pkgname}-dbg-${version}" ]; then
for f in ${subpackages}; do
# If there's an explicit subpkg named ${pkgname}-dbg, don't generate
# it automagically (required by linuxX.X).
if [ "${sourcepkg}-dbg" = "$f" ]; then
found_dbg_subpkg=1
break
fi
done
if [ -z "$found_dbg_subpkg" -a -d "${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/${pkgname}-dbg-${version}" ]; then
source ${XBPS_COMMONDIR}/environment/setup-subpkg/subpkg.sh
repo=$XBPS_REPOSITORY/debug
_pkgver=${pkgname}-dbg-${version}_${revision}