summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--src/ob-genchanges.sh5
-rwxr-xr-xtests/exe/ob-genchanges.sh4
3 files changed, 8 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 6d6937e..fd7a007 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,8 @@ Utilities:
binary package.
* ob-genchanges now organizes source packages into section "src"
instead of "base".
+ * ob-genchanges now organizes binary packages into sections specified
+ by "Section" field when present.
libopkbuild:
diff --git a/src/ob-genchanges.sh b/src/ob-genchanges.sh
index b427bc3..8290de6 100644
--- a/src/ob-genchanges.sh
+++ b/src/ob-genchanges.sh
@@ -76,6 +76,7 @@ write_files_bin()
local pkg=
local arch=
local plat=
+ local sect=
local file=
printf 'Files:\n' >&3
@@ -84,10 +85,12 @@ 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}"
+ sect="$(ob_get_binary_parameter "${pkg}" 'Section')"
+ [ x"${sect}" = x'' ] && sect='base'
file="${pkg}_${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
diff --git a/tests/exe/ob-genchanges.sh b/tests/exe/ob-genchanges.sh
index c0e38fc..1b8e951 100755
--- a/tests/exe/ob-genchanges.sh
+++ b/tests/exe/ob-genchanges.sh
@@ -48,7 +48,7 @@ cmd_is 'changes file' cat '../../foo_1.0-1_i686-linux-glibc_x60.changes' <<-EOF
foo (1.0-1) trunk
* Initial release.
Files:
- 0 base foo_1.0-1_i686-linux-glibc_all.opk
+ 0 libdev foo_1.0-1_i686-linux-glibc_all.opk
0 base baz-qux_1.0-1_all_all.opk
- 0 base bar_1.0-1_all_all.opk
+ 0 utils bar_1.0-1_all_all.opk
EOF