diff --git a/Manual.md b/Manual.md index 0eeab06cc62..3d15c8a2e5c 100644 --- a/Manual.md +++ b/Manual.md @@ -387,6 +387,8 @@ files are always removed automatically. This must match the basename of any url defined in `${distfiles}`. Example `skip_extraction="foo-${version}.tar.gz"`. +- `disable_debug` If enabled -dbg packages won't be generated even if `XBPS_DEBUG_PKGS` is set. + - `force_debug_pkgs` If enabled binary packages with debugging symbols will be generated even if `XBPS_DEBUG_PKGS` is disabled in `void-packages/etc/conf` or in the `command line arguments`. diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh index 651c04c3cef..2b6ea90cd65 100644 --- a/common/environment/setup/sourcepkg.sh +++ b/common/environment/setup/sourcepkg.sh @@ -16,7 +16,7 @@ unset -v CC CXX CPP GCC LD AR AS RANLIB NM OBJDUMP OBJCOPY STRIP READELF unset -v skip_extraction # hooks/post-install/03-strip-and-debug-pkgs -unset -v force_debug_pkgs +unset -v disable_debug force_debug_pkgs ## FUNCTIONS unset -f pre_fetch do_fetch post_fetch diff --git a/common/hooks/post-install/03-strip-and-debug-pkgs.sh b/common/hooks/post-install/03-strip-and-debug-pkgs.sh index d42c86d0d4a..8fec05410e8 100644 --- a/common/hooks/post-install/03-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/03-strip-and-debug-pkgs.sh @@ -6,7 +6,7 @@ make_debug() { local dname= fname= dbgfile= - [ -z "$XBPS_DEBUG_PKGS" -o -n "$nonfree" ] && return 0 + [ -z "$XBPS_DEBUG_PKGS" -o -n "$disable_debug" -o -n "$nonfree" ] && return 0 dname=$(echo "$(dirname $1)"|sed -e "s|${PKGDESTDIR}||g") fname="$(basename $1)" @@ -25,7 +25,7 @@ make_debug() { attach_debug() { local dname= fname= dbgfile= - [ -z "$XBPS_DEBUG_PKGS" -o -n "$nonfree" ] && return 0 + [ -z "$XBPS_DEBUG_PKGS" -o -n "$disable_debug" -o -n "$nonfree" ] && return 0 dname=$(echo "$(dirname $1)"|sed -e "s|${PKGDESTDIR}||g") fname="$(basename $1)" @@ -41,7 +41,7 @@ attach_debug() { create_debug_pkg() { local _pkgname= _destdir= - [ -z "$XBPS_DEBUG_PKGS" -o -n "$nonfree" ] && return 0 + [ -z "$XBPS_DEBUG_PKGS" -o -n "$disable_debug" -o -n "$nonfree" ] && return 0 [ ! -d "${PKGDESTDIR}/usr/lib/debug" ] && return 0 _pkgname="${pkgname}-dbg-${version}"