Compare commits

..

2 Commits

Author SHA1 Message Date
Caleb Maclennan
efeac8504d Merge branch 'update-checksums-on-edit' into 'master'
feat(build): update checksums when editing source files during build

See merge request archlinux/devtools!240
2025-07-27 08:33:46 +03:00
Caleb Maclennan
f2db03786a feat(build): update checksums when editing source files during build
Using the --edit option while doing a build frequently implies making
changes to the sources...whether it is updating a URL or dropping
obsolete patches or other changes. It isn't a 100% correlation of
course, but more often than not any changes made during editing are
*expected* to also update the checksums to be in sync.

Using the --pkgver option already triggers this, but other subsequent
edits do not making for frequent failed edit/build cycles.
2024-03-02 11:22:31 +03:00
2 changed files with 2 additions and 1 deletions

View File

@@ -80,7 +80,7 @@ check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAG
makechrootpkg_args+=("${@:$OPTIND}")
# Automatically recreate the root chroot if a version mismatch is detected
CURRENT_CHROOT_VERSION=$(cat "${chroots}/${repo}-${arch}/root/.arch-chroot" 2>/dev/null)
CURRENT_CHROOT_VERSION=$(cat "${chroots}/${repo}-${arch}/root/.arch-chroot")
if [[ -f "${chroots}/${repo}-${arch}/root/.arch-chroot" ]] && [[ "$CURRENT_CHROOT_VERSION" != "$CHROOT_VERSION" ]]; then
warning "Recreating chroot '%s' (%s) as it is not at version %s" "${chroots}/${repo}-${arch}/root" "$CURRENT_CHROOT_VERSION" "$CHROOT_VERSION"
clean_first=true

View File

@@ -196,6 +196,7 @@ pkgctl_build() {
;;
-e|--edit)
EDIT=1
UPDATE_CHECKSUMS=1
shift
;;
-o|--offload)