summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-05-26 00:36:47 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-05-26 00:36:47 (EDT)
commite2bcd0db8539a731e738ac1b28dbf5b76bcb880b (patch)
treedae1c7a57a86d21b2add3bf273525c032a909cc5
parent39cb9c2e42e581ef832bbe8f63d7ac6db37c6ef5 (diff)
prof_proteanos_validate_archplat(): New function
This gets a Manifest file from a package archive managed by pro-archman 1.4.0 or later instead of hardcoding a list of architectures and platforms, which may change between prokit versions or even ProteanOS suites.
-rw-r--r--lib/profile/proteanos.sh31
1 files changed, 21 insertions, 10 deletions
diff --git a/lib/profile/proteanos.sh b/lib/profile/proteanos.sh
index 2f82130..b78c5e8 100644
--- a/lib/profile/proteanos.sh
+++ b/lib/profile/proteanos.sh
@@ -20,16 +20,6 @@
use opkg
-# TODO: This should be replaced with a prof_proteanos_validate_archplat()
-# function that gets valid architectures and platforms from the package archive
-# (which pro-archman needs to list in the distribution).
-prof_proteanos_archplats='
-amd64-linux-glibc dev
-i686-linux-glibc dev
-i686-linux-glibc ao751h
-i686-linux-glibc dimension2400
-i686-linux-glibc x60
-'
prof_proteanos_fstab_linux="\
proc /proc proc defaults
sys /sys sysfs defaults
@@ -111,6 +101,27 @@ prof_proteanos_select_mirror()
printf '%s\n' "${mirror}"
}
+prof_proteanos_validate_archplat()
+{
+ local mirror="${1}"
+ local arch="${2}"
+ local plat="${3}"
+ local suite="${4}"
+
+ while read -r archplat; do
+ case "${archplat}" in
+ "${arch}/${plat}")
+ return 0
+ ;;
+ esac
+ done <<-EOF
+ $(wget -q -O - "${mirror}/feeds/${suite}/Manifest" | sed \
+ 's|/[^/]*$||; /^all\//d; /\/all$/d;')
+ EOF
+
+ return 1
+}
+
prof_proteanos_feeds()
{
local mirror="${1}"