From 83cffac17b6ca6990d8c0089a090b4227177314b Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 28 Jul 2013 20:12:42 -0400 Subject: Add size to pool packages index files. --- 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" -- cgit v0.9.1