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:
parent
e123fbb83d
commit
5c95087605
1 changed files with 10 additions and 2 deletions
|
@ -120,7 +120,7 @@ genpkg() {
|
||||||
|
|
||||||
hook() {
|
hook() {
|
||||||
local arch= binpkg= repo= _pkgver= _desc= _pkgn= _pkgv= _provides= \
|
local arch= binpkg= repo= _pkgver= _desc= _pkgn= _pkgv= _provides= \
|
||||||
_replaces= _reverts=
|
_replaces= _reverts= f= found_dbg_subpkg=
|
||||||
|
|
||||||
if [ -n "$noarch" ]; then
|
if [ -n "$noarch" ]; then
|
||||||
arch=noarch
|
arch=noarch
|
||||||
|
@ -155,7 +155,15 @@ hook() {
|
||||||
done
|
done
|
||||||
|
|
||||||
# Generate -dbg pkg.
|
# 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
|
source ${XBPS_COMMONDIR}/environment/setup-subpkg/subpkg.sh
|
||||||
repo=$XBPS_REPOSITORY/debug
|
repo=$XBPS_REPOSITORY/debug
|
||||||
_pkgver=${pkgname}-dbg-${version}_${revision}
|
_pkgver=${pkgname}-dbg-${version}_${revision}
|
||||||
|
|
Loading…
Reference in a new issue