diff options
Diffstat (limited to 'src/ob-genchanges.sh')
-rw-r--r-- | src/ob-genchanges.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/ob-genchanges.sh b/src/ob-genchanges.sh index 9e8c75a..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 @@ -63,10 +66,10 @@ write_files_src() local file= printf 'Files:\n' >&3 - file="src-${OPK_SOURCE}_${OPK_SOURCE_VERSION}_src_all.opk" + file="src:${OPK_SOURCE}_${OPK_SOURCE_VERSION}_src_all.opk" printf ' %s %s %s\n' \ "$(wc -c "../../${file}" | cut -d ' ' -f 1)" \ - 'base' "${file}" >&3 + 'src' "${file}" >&3 return 0 } @@ -76,6 +79,7 @@ write_files_bin() local pkg= local arch= local plat= + local sect= local file= printf 'Files:\n' >&3 @@ -84,10 +88,13 @@ write_files_bin() [ x"${arch}" != x'all' ] && arch="${OPK_HOST_ARCH}" plat="$(ob_get_binary_parameter "${pkg}" 'Platform')" [ x"${plat}" != x'all' ] && plat="${OPK_HOST_PLAT}" - file="${pkg}_${OPK_BINARY_VERSION}_${arch}_${plat}.opk" + sect="$(ob_get_binary_parameter "${pkg}" 'Section')" + [ x"${sect}" = x'' ] && sect='base' + file="$(ob_qualify_package_name "${pkg}" "${OPK_HOST_ARCH}")" + file="${file}_${OPK_BINARY_VERSION}_${arch}_${plat}.opk" printf ' %s %s %s\n' \ "$(wc -c "../../${file}" | cut -d ' ' -f 1)" \ - 'base' "${file}" >&3 + "${sect}" "${file}" >&3 done return 0 |