summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-07-28 20:12:42 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-07-28 20:21:00 (EDT)
commit83cffac17b6ca6990d8c0089a090b4227177314b (patch)
tree2f9d39ce184e3e79fd56a225cf715004e1e40141 /lib
parenta2f287b0ba963d64a25b016e679af0e013242f43 (diff)
Add size to pool packages index files.
Diffstat (limited to 'lib')
-rw-r--r--lib/db.sh7
-rw-r--r--lib/include.sh2
-rw-r--r--lib/remove.sh3
-rw-r--r--lib/suite.sh3
4 files changed, 9 insertions, 6 deletions
diff --git a/lib/db.sh b/lib/db.sh
index f2742df..9e0533c 100644
--- a/lib/db.sh
+++ b/lib/db.sh
@@ -204,14 +204,15 @@ db_add_package()
local arch="${2}"
local source="${3}"
local binver="${4}"
- local sect="${5}"
- local pkg="${6}"
+ local size="${5}"
+ local sect="${6}"
+ local pkg="${7}"
local dir=
dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db"
dir="${dir}/${binver}_${arch}_${plat}"
mkdir -p "${dir}"
- printf '%s %s\n' "${sect}" "${pkg}" >>"${dir}/packages"
+ printf '%s %s %s\n' "${size}" "${sect}" "${pkg}" >>"${dir}/packages"
return 0
}
diff --git a/lib/include.sh b/lib/include.sh
index f90fcd5..1dabd44 100644
--- a/lib/include.sh
+++ b/lib/include.sh
@@ -111,7 +111,7 @@ include_changes()
${file%.opk}
EOF
db_add_package "${plat}" "${arch}" "${source}" "${binver}" \
- "${sect}" "${pkg}"
+ "${size}" "${sect}" "${pkg}"
pool_file="pool/$(hash_name "${source}")/${source}"
pool_file="${pool_file}/${pkg}_${binver}_${arch}_${plat}.opk"
cp -p "$(dirname "${changes}")/${file}" \
diff --git a/lib/remove.sh b/lib/remove.sh
index f484b19..a89ff13 100644
--- a/lib/remove.sh
+++ b/lib/remove.sh
@@ -48,6 +48,7 @@ remove_packages_from_suite_archplat()
local source="${5}"
local binver=
local refs=
+ local size=
local sect=
local pkg=
local file=
@@ -60,7 +61,7 @@ remove_packages_from_suite_archplat()
db_del_binver "${chan}" "${dist}" "${plat}" "${arch}" "${source}"
refs=$(db_dec_references "${plat}" "${arch}" "${source}" "${binver}")
- while read -r sect pkg; do
+ while read -r size sect pkg; do
feed_remove_package "${chan}" "${dist}" "${plat}" "${arch}" \
"${sect}" "${pkg}"
if [ ${refs} -eq 0 ]; then
diff --git a/lib/suite.sh b/lib/suite.sh
index b4a4235..2364e5a 100644
--- a/lib/suite.sh
+++ b/lib/suite.sh
@@ -51,6 +51,7 @@ _suite_copy_source()
local plat=
local arch=
local binver=
+ local size=
local sect=
local pkg=
local pool_file=
@@ -58,7 +59,7 @@ _suite_copy_source()
while read -r plat arch; do
binver="$(db_get_binver "${src_chan}" "${src_dist}" \
"${plat}" "${arch}" "${source}")"
- while read -r sect pkg; do
+ while read -r size sect pkg; do
pool_file="pool/$(hash_name "${source}")/${source}"
pool_file="${pool_file}/${pkg}_${binver}"
pool_file="${pool_file}_${arch}_${plat}.opk"