pacman/scripts/libmakepkg
Levente Polyak 18e49f2c97
debugflags: ensure to only append debug flags once when building
During a package build we call prepare_buildenv in multiple stages of
the process. For debug packages, one of the hooks is buildenv_debugflags
which populates the debug flags to the according variables.

The issue is that the behavior of the current implementation of
buildenv_debugflags is not idempotent, so consecutive calls will append
the same flags again. In certain cases this isn't an issue, however
for context aware build frontends like cargo any change of the build
inputs leads to a fresh build. This means that any invocation of such
a build ecosystem inside the package() function will trigger a full
rebuild, which is not desired.

To fix this issue, this commit makes buildenv_debugflags idempotent
by only appending flags once to the target variables.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-11-17 18:56:44 +01:00
..
autodep Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
buildenv debugflags: ensure to only append debug flags once when building 2023-11-17 18:56:44 +01:00
executable Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
integrity Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
lint_config Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
lint_package Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
lint_pkgbuild Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
reproducible Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
source Omit trailing .git from url when comparing git remote urls. 2023-11-04 10:09:59 +10:00
tidy Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
util debugflags: ensure to only append debug flags once when building 2023-11-17 18:56:44 +01:00
.gitignore libmakepkg: fix .gitignore to simply ignore all generated .sh files 2017-12-07 15:37:20 +10:00
autodep.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
buildenv.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
executable.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
integrity.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
lint_config.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
lint_package.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
lint_pkgbuild.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
meson.build libmakepkg: automatically add library sonames to provides 2021-12-29 15:20:05 +10:00
reproducible.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
source.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
srcinfo.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
tidy.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
util.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00