use/repo: add support modern sources.list format
Old format: rpm [p7] http://ftp.altlinux.org/pub/distributions/ALTLinux/p7/branch x86_64 classic New format: rpm [p8] http://ftp.altlinux.org/pub/distributions/ALTLinux p8/branch/x86_64 classic
This commit is contained in:
parent
0112879c29
commit
e59e1cda26
@ -2,13 +2,13 @@
|
|||||||
# enable online repos if possible, just quit if anything's wrong
|
# enable online repos if possible, just quit if anything's wrong
|
||||||
|
|
||||||
repo_source='/etc/apt/sources.list.d/alt.list'
|
repo_source='/etc/apt/sources.list.d/alt.list'
|
||||||
host='http://ftp.altlinux.org'
|
|
||||||
|
|
||||||
[ -s "$repo_source" ] || exit 0
|
[ -s "$repo_source" ] || exit 0
|
||||||
|
|
||||||
# regexps from alterator-pkg (via installer-feature-online-repo)
|
# regexps from alterator-pkg (via installer-feature-online-repo)
|
||||||
prefix_re="[[:space:]]*rpm[[:space:]]\+\([^[:space:]]\+[[:space:]]\+\)\?"
|
prefix_re="[[:space:]]*rpm[[:space:]]\+\([^[:space:]]\+[[:space:]]\+\)\?"
|
||||||
updates_re="${prefix_re}http:\/\/\([^[:space:]]\+\)[[:space:]]*"
|
host_re="http:\/\/\([^[:space:]]\+\)[[:space:]]\+"
|
||||||
|
updates_re="${prefix_re}${host_re}\([^[:space:]]\+\/\)\?"
|
||||||
|
|
||||||
# architectures
|
# architectures
|
||||||
host_arch="$(rpm --eval '%_host_cpu')"
|
host_arch="$(rpm --eval '%_host_cpu')"
|
||||||
|
Loading…
Reference in New Issue
Block a user