~sircmpwn/alpine-devel (mirror)

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH abuild] Add new lines around the checksums in APKBUILD

Details
Message ID
<20200607212950.1078853-1-wolf@wolfsden.cz>
DKIM signature
missing
Download raw message
Patch: +4 -3
In order to make diffs more tidy and the APKBUILD overall more visually
pleasing, new lines are added after opening and before closing quote,
turning

sha512sums="HASH  foo
HASH  bar"

into

sha512sums="
HASH  foo
HASH  bar
"

therefore keeping alignment of file names.
---
 abuild.in | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/abuild.in b/abuild.in
index 266a7c6..5c5e74f 100644
--- a/abuild.in
+++ b/abuild.in
@@ -2218,11 +2218,12 @@ checksum() {
	local s files
	[ -z "$source" ] && [ -n "${md5sums}${sha256sums}${sha512sums}" ] \
		&& msg "Removing checksums from APKBUILD"
	sed -E -i -e '/^(md5|sha[0-9]+)sums=".*[^"]$/,/"$/d' \
	sed -E -i \
		-e '/^(md5|sha[0-9]+)sums=".*"$/d' \
		-e '/^(md5|sha[0-9]+)sums="/,/"$/d' \
		\
		-e "/^(md5|sha[0-9]+)sums='.*[^']\$/,/'\$/d" \
		-e "/^(md5|sha[0-9]+)sums='.*'\$/d" \
		-e "/^(md5|sha[0-9]+)sums='/,/'\$/d" \
		APKBUILD

	[ -z "$source" ] && return 0
@@ -2236,7 +2237,7 @@ checksum() {
	sha256sums=
	sha512sums="$(cd "$srcdir" && sha512sum $files)" \
		|| die "sha512sum failed"
	echo "sha512sums=\"$sha512sums\"" >>"$APKBUILD"
	printf 'sha512sums="\n%s\n"\n' "$sha512sums" >>"$APKBUILD"
}

rootbld_actions() {
-- 
2.26.2
Details
Message ID
<20200619181414.bsjflqgoanyxtkoj@wolfsden.cz>
In-Reply-To
<20200607212950.1078853-1-wolf@wolfsden.cz> (view parent)
DKIM signature
missing
Download raw message
Hello,

could I get some feedback on this patch?



Thank you,
W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
Reply to thread Export thread (mbox)