summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2018-08-30 16:06:14 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-09-02 18:08:00 -0400
commit3715236d094b86cdcf7d5bb7080bcab33476e2fd (patch)
tree180c882016946a8039ecf25218a0474c129f42ce
parentbc4832364050a05976dce33f28bba9ed3193010d (diff)
db-import-pkg: Use {PKG,SRC}POOL rather than OUR{PKG,SRC}POOL
These values should all be the same.
-rw-r--r--config.local.archlinux322
-rw-r--r--config.local.archlinuxarm2
-rw-r--r--config.local.community3
-rw-r--r--config.local.packages3
-rwxr-xr-xdb-import-pkg25
5 files changed, 9 insertions, 26 deletions
diff --git a/config.local.archlinux32 b/config.local.archlinux32
index d1bf74c..f8582e8 100644
--- a/config.local.archlinux32
+++ b/config.local.archlinux32
@@ -10,8 +10,6 @@ ARCHTAGS=({build-support,core,testing,extra,community}-i686)
ARCHPATH='$arch/$repo'
ARCHPKGPOOL='pool'
-OURPKGPOOL='pool/archlinux32'
-
INHERIT=(
'pool/packages'
'pool/community'
diff --git a/config.local.archlinuxarm b/config.local.archlinuxarm
index 7ff2586..7c8af4f 100644
--- a/config.local.archlinuxarm
+++ b/config.local.archlinuxarm
@@ -9,8 +9,6 @@ SRCPOOL='sources/alarm'
ARCHTAGS=({core,extra,community}-armv7h)
ARCHPATH='$arch/$repo'
-OURPKGPOOL='pool/alarm'
-
INHERIT=(
'pool/packages'
'pool/community'
diff --git a/config.local.community b/config.local.community
index b5070c1..6569eef 100644
--- a/config.local.community
+++ b/config.local.community
@@ -11,9 +11,6 @@ ARCHPATH='$repo/os/$arch'
ARCHPKGPOOL='pool/community'
ARCHSRCPOOL='sources/community'
-OURPKGPOOL='pool/community'
-OURSRCPOOL='sources/community'
-
# Of the few tier-1 mirrors with the 'sources/' folder:
#
# $ ./config-list-mirrors-archlinux --require=sources | jq -r '.[].url'
diff --git a/config.local.packages b/config.local.packages
index 814c41a..1d47755 100644
--- a/config.local.packages
+++ b/config.local.packages
@@ -11,9 +11,6 @@ ARCHPATH='$repo/os/$arch'
ARCHPKGPOOL='pool/packages'
ARCHSRCPOOL='sources/packages'
-OURPKGPOOL='pool/packages'
-OURSRCPOOL='sources/packages'
-
# Of the few tier-1 mirrors with the 'sources/' folder:
#
# $ ./config-list-mirrors-archlinux --require=sources | jq -r '.[].url'
diff --git a/db-import-pkg b/db-import-pkg
index 02344ae..760dfdf 100755
--- a/db-import-pkg
+++ b/db-import-pkg
@@ -153,7 +153,7 @@ poolify() {
local restore paths path
while read -r pkgname fullpkgver; do
paths=()
- for pool in "${INHERIT[@]}" "$OURPKGPOOL"; do
+ for pool in "${INHERIT[@]}" "$PKGPOOL"; do
paths+=(
"${FTP_BASE}/${pool}/${pkgname}-${fullpkgver}-any"${PKGEXTS}
"${FTP_BASE}/${pool}/${pkgname}-${fullpkgver}-${arch}"${PKGEXTS}
@@ -245,8 +245,8 @@ make_repo_dbs() {
# - ${WORKDIR}/expac/ : Scratch directory for expac_file()
# (download)
# - ${WORKDIR}/rsync/ : Where we download '.db' files to
-# - ${FTP_BASE}/${OURPKGPOOL} : Where we download packages to
-# - ${FTP_BASE}/${OURSRCPOOL} : Where we download sources to
+# - ${FTP_BASE}/${PKGPOOL} : Where we download packages to
+# - ${FTP_BASE}/${SRCPOOL} : Where we download sources to
# (analysis)
# - ${FTP_BASE}/${INHERIT} : Where we look for duplicate files
# - ${FTP_BASE}/.../${repo}.db : Where we generate ${WORKDIR}/old/ from
@@ -279,13 +279,13 @@ main() {
source "$config_file"
local ret=0 varname varref
- for varname in PKGEXTS DBEXT FILESEXT FTP_BASE; do
+ for varname in PKGEXTS DBEXT FILESEXT FTP_BASE PKGPOOL SRCPOOL; do
if [[ -z ${!varname:-} ]] || is_array "$varname"; then
print "Configure '%s' as a non-empty string in %q (or %q):" "$varname" "$config_file" "$LOCAL_CONFIG"
ret=$EXIT_NOTCONFIGURED
fi
done
- for varname in ARCHMIRROR ARCHPATH OURPKGPOOL; do # optional: OURSRCPOOL ARCH{PKG,SRC}POOL
+ for varname in ARCHMIRROR ARCHPATH; do # optional: ARCHPKGPOOL ARCHSRCPOOL
if [[ -z ${!varname:-} ]] || is_array "$varname"; then
print "Configure '%s' as a non-empty string in DBSCRIPTS_CONFIG=%q (did you set DBSCRIPTS_CONFIG correctly?):" "$varname" "$LOCAL_CONFIG"
ret=$EXIT_NOTCONFIGURED
@@ -298,13 +298,6 @@ main() {
fi
done
- if [[ -n ${ARCHSRCPOOL:-} && -z ${OURSRCPOOL:-} ]]; then
- print 'If you set %s, then you must set %s' {ARCH,OUR}SRCPOOL
- ret=$EXIT_NOTCONFIGURED
- elif [[ -n ${OURSRCPOOL:-} && -z ${ARCHSRCPOOL:-} ]]; then
- print 'If you set %s, then you must set %s' {OUR,ARCH}SRCPOOL
- ret=$EXIT_NOTCONFIGURED
- fi
if [[ -n ${ARCHSRCPOOL:-} && -z ${ARCHPKGPOOL:-} ]]; then
print '%s requires that %s is also set' ARCH{SRC,PKG}POOL
ret=$EXIT_NOTCONFIGURED
@@ -432,7 +425,7 @@ main() {
sync_pool \
"${ARCHMIRROR}/$(get_repo_dir "${_repo}" "${_arch}")/" \
"${WORKDIR}/${_tag}.whitelist" \
- "${FTP_BASE}/${OURPKGPOOL}/"
+ "${FTP_BASE}/${PKGPOOL}/"
poolify "${_arch}" \
<"${WORKDIR}/new/${_tag}.txt" \
>"${WORKDIR}/${_tag}.pool"
@@ -452,11 +445,11 @@ main() {
sync_pool \
"${ARCHMIRROR}/${ARCHPKGPOOL}/" \
"${WORKDIR}/all.whitelist" \
- "${FTP_BASE}/${OURPKGPOOL}/"
+ "${FTP_BASE}/${PKGPOOL}/"
for _tag in "${ARCHTAGS[@]}"; do
_repo=${_tag%-*}
_arch=${_tag##*-}
- poolify "${_arch}" "${OURPKGPOOL}" \
+ poolify "${_arch}" "${PKGPOOL}" \
<"${WORKDIR}/new/${_tag}.txt" \
>"${WORKDIR}/${_tag}.pool"
make_repo_symlinks "$_tag" \
@@ -468,7 +461,7 @@ main() {
sync_pool \
"${ARCHMIRROR}/${ARCHSRCPOOL}/" \
"${WORKDIR}/all.whitelist" \
- "${FTP_BASE}/${OURSRCPOOL}/"
+ "${FTP_BASE}/${SRCPOOL}/"
fi
fi