diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-05 23:34:45 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-05 23:36:29 (EDT) |
commit | 5de3fdaee0e5df4b29ea11986f27f5ab3670d3b4 (patch) | |
tree | 0b05bb0f76bcc58ea8dbaaa3567e649c75e25d5b | |
parent | b72afb4bca00fe4148fb3f9f8cea074ec1b8a661 (diff) |
ob-genchanges: Sort Binary and drop trailing space
Generate Binary the same way ob-gencontrol does.
-rw-r--r-- | src/ob-genchanges.sh | 5 | ||||
-rwxr-xr-x | tests/exe/ob-genchanges.sh | 2 |
2 files changed, 5 insertions, 2 deletions
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 |