Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/util/makepkg.sh
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2024-04-19 21:16:06 +0200
committerLevente Polyak <anthraxx@archlinux.org>2024-04-23 20:23:49 +0200
commit9a5181db5bfa78d33d3123145ea4c84375f2e8f2 (patch)
tree0fa37ffd91753cb57368eb7d4546fa0aeeead82c /src/lib/util/makepkg.sh
parent55c2ca1312e649916a9a4469b7e88464f2f20c38 (diff)
feat(pkgctl): add internal update checksums to better control output
This allows us to have more control over the output and status logs. Using this method we are able to avoid cluttering the version upgrade subcommand while downloading sources for updating the checksums. Having this internally will also allow us in the future to have smart checksums updating by only trying to change the checksums of sources that have actually changed, for example when adjusting a patch file we should avoid trying to overwrite the archive checksums unintentionally. Component: pkgctl version upgrade
Diffstat (limited to 'src/lib/util/makepkg.sh')
-rw-r--r--src/lib/util/makepkg.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/util/makepkg.sh b/src/lib/util/makepkg.sh
index 22df247..d7ec74c 100644
--- a/src/lib/util/makepkg.sh
+++ b/src/lib/util/makepkg.sh
@@ -22,9 +22,11 @@ makepkg_source_package() {
return
fi
(
+ # shellcheck disable=SC2030 disable=SC2031
export LIBMAKEPKG_LINT_PKGBUILD_SH=1
lint_pkgbuild() { :; }
+ # shellcheck disable=SC2030 disable=SC2031
export LIBMAKEPKG_SRCINFO_SH=1
write_srcinfo() { print_srcinfo; }
@@ -35,3 +37,21 @@ makepkg_source_package() {
source "$(command -v makepkg)"
)
}
+
+makepkg_generate_integrity() {
+ if [[ -z ${DEVTOOLS_GENERATE_INTEGRITY} ]]; then
+ [[ -z ${WORKDIR:-} ]] && setup_workdir
+ export WORKDIR DEVTOOLS_INCLUDE_COMMON_SH
+ bash -$- -c "DEVTOOLS_GENERATE_INTEGRITY=1; source '${BASH_SOURCE[0]}' && ${FUNCNAME[0]}"
+ return
+ fi
+ (
+ # shellcheck disable=SC2030 disable=SC2031
+ export LIBMAKEPKG_LINT_PKGBUILD_SH=1
+ lint_pkgbuild() { :; }
+
+ set +e -- --geninteg
+ # shellcheck source=/usr/bin/makepkg
+ source "$(command -v makepkg)"
+ )
+}