summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-08-14 12:08:53 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-08-14 12:15:09 (EDT)
commitd44ba3fdd61ccedc00033e47c4d4eea117002fc4 (patch)
tree1a6644acdd3d8f62ea238444009be1cc9c85f522
parent892d2b57396cf1469742367b65a5e945e9944c39 (diff)
db_*_binver(): Reverse arch and plat.
-rw-r--r--lib/db.sh18
-rw-r--r--lib/include.sh4
-rw-r--r--lib/remove.sh4
-rw-r--r--lib/suite.sh4
4 files changed, 15 insertions, 15 deletions
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/<hash>/<source>/<plat>_<arch>".
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