From d44ba3fdd61ccedc00033e47c4d4eea117002fc4 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 14 Aug 2013 12:08:53 -0400 Subject: db_*_binver(): Reverse arch and plat. --- (limited to 'lib') diff --git a/lib/db.sh b/lib/db.sh index 449e14c..af8cc15 100644 --- a/lib/db.sh +++ b/lib/db.sh @@ -79,13 +79,13 @@ db_get_binver() { local chan="${1}" local dist="${2}" - local plat="${3}" - local arch="${4}" + local arch="${3}" + local plat="${4}" local source="${5}" local dir= dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" - dir="${dir}/$(hash_name "${source}")/${source}/${plat}_${arch}" + dir="${dir}/$(hash_name "${source}")/${source}/${arch}_${plat}" if [ -f "${dir}/binver" ]; then cat "${dir}/binver" fi @@ -97,14 +97,14 @@ db_set_binver() { local chan="${1}" local dist="${2}" - local plat="${3}" - local arch="${4}" + local arch="${3}" + local plat="${4}" local source="${5}" local binver="${6}" local dir= dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" - dir="${dir}/$(hash_name "${source}")/${source}/${plat}_${arch}" + dir="${dir}/$(hash_name "${source}")/${source}/${arch}_${plat}" mkdir -p "${dir}" printf '%s\n' "${binver}" >"${dir}/binver" @@ -115,13 +115,13 @@ db_del_binver() { local chan="${1}" local dist="${2}" - local plat="${3}" - local arch="${4}" + local arch="${3}" + local plat="${4}" local source="${5}" local dir= dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" - dir="${dir}/$(hash_name "${source}")/${source}/${plat}_${arch}" + dir="${dir}/$(hash_name "${source}")/${source}/${arch}_${plat}" rm -f "${dir}/binver" # Remove ".../.db///_". rmdir "${dir}" diff --git a/lib/include.sh b/lib/include.sh index 1dabd44..662f1ab 100644 --- a/lib/include.sh +++ b/lib/include.sh @@ -71,7 +71,7 @@ include_changes() LC_COLLATE='C' sort | uniq)" while read -r binver arch plat; do old_ver="$(db_get_binver "${chan}" "${dist}" \ - "${plat}" "${arch}" "${source}")" + "${arch}" "${plat}" "${source}")" if [ "x${old_ver}" != 'x' ]; then if [ "x${old_ver}" = "x${binver}" ]; then error 2 "$(get_msg 'include_bvap_exists')" \ @@ -80,7 +80,7 @@ include_changes() remove_packages_from_suite_archplat "${chan}" \ "${dist}" "${plat}" "${arch}" "${source}" fi - db_set_binver "${chan}" "${dist}" "${plat}" "${arch}" \ + db_set_binver "${chan}" "${dist}" "${arch}" "${plat}" \ "${source}" "${binver}" db_inc_references "${plat}" "${arch}" "${source}" "${binver}" \ >/dev/null diff --git a/lib/remove.sh b/lib/remove.sh index a89ff13..79428f0 100644 --- a/lib/remove.sh +++ b/lib/remove.sh @@ -53,12 +53,12 @@ remove_packages_from_suite_archplat() local pkg= local file= - binver="$(db_get_binver "${chan}" "${dist}" "${plat}" "${arch}" \ + binver="$(db_get_binver "${chan}" "${dist}" "${arch}" "${plat}" \ "${source}")" if [ "x${binver}" = 'x' ]; then return 0 fi - db_del_binver "${chan}" "${dist}" "${plat}" "${arch}" "${source}" + db_del_binver "${chan}" "${dist}" "${arch}" "${plat}" "${source}" refs=$(db_dec_references "${plat}" "${arch}" "${source}" "${binver}") while read -r size sect pkg; do diff --git a/lib/suite.sh b/lib/suite.sh index d6c92ef..709c3e6 100644 --- a/lib/suite.sh +++ b/lib/suite.sh @@ -63,8 +63,8 @@ _suite_copy_source() while read -r plat arch; do binver="$(db_get_binver "${src_chan}" "${src_dist}" \ - "${plat}" "${arch}" "${source}")" - db_set_binver "${dst_chan}" "${dst_dist}" "${plat}" "${arch}" \ + "${arch}" "${plat}" "${source}")" + db_set_binver "${dst_chan}" "${dst_dist}" "${arch}" "${plat}" \ "${source}" "${binver}" db_inc_references "${plat}" "${arch}" "${source}" "${binver}" \ >/dev/null -- cgit v0.9.1