From 5de3fdaee0e5df4b29ea11986f27f5ab3670d3b4 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 05 Jul 2020 23:34:45 -0400 Subject: ob-genchanges: Sort Binary and drop trailing space Generate Binary the same way ob-gencontrol does. --- diff --git a/src/ob-genchanges.sh b/src/ob-genchanges.sh index 56070e5..323f417 100644 --- a/src/ob-genchanges.sh +++ b/src/ob-genchanges.sh @@ -31,7 +31,10 @@ write_changes() printf 'Format: 1.0\n' >&3 printf 'Source: %s\n' "${OPK_SOURCE}" >&3 - printf 'Binary: %s\n' "$(ob_get_binary_packages)" >&3 + printf 'Binary:' >&3 + printf '%s\n' $(ob_get_binary_packages) | LC_ALL='C' sort | \ + xargs printf ' %s' >&3 + printf '\n' >&3 printf 'Version: %s\n' "${version}" >&3 printf 'Architecture: %s\n' "${arch}" >&3 printf 'Platform: %s\n' "${plat}" >&3 diff --git a/tests/exe/ob-genchanges.sh b/tests/exe/ob-genchanges.sh index 580942b..d0bc6a0 100755 --- a/tests/exe/ob-genchanges.sh +++ b/tests/exe/ob-genchanges.sh @@ -32,7 +32,7 @@ command_ok_ 'ob-genchanges exit status' -- ob-genchanges cmd_is 'changes file' cat '../../foo_1.0-1_i686-linux-glibc_x60.changes' <<-EOF Format: 1.0 Source: foo - Binary: bar baz-qux foo + Binary: bar baz-qux foo Version: 1.0-1 Architecture: i686-linux-glibc Platform: x60 -- cgit v0.9.1