[arch-releng] AIF [PATCH 1/2] Fix URL parsing for core repo

Gerhard Brauer gerbra at archlinux.de
Sun Mar 1 14:59:00 EST 2009


When doing ftp install method the selected mirror URL is badly parsed to
the generated /tmp/pacman.conf. So fetching the core db from mirror
fails. Example:

[gerhard at ws01 ~]$ serverurl='ftp://ftp.he.de/mirror/$repo/os/i686'
[gerhard at ws01 ~]$ echo $serverurl 
ftp://ftp.he.de/mirror/$repo/os/i686
[gerhard at ws01 ~]$ repo=core

old code:
---------
[gerhard at ws01 ~]$ echo "Server = ${serverurl/\/\$repo\//\/$repo\/}"
Server = ftp://ftp.he.de/mirror\/core\/os/i686

patched:
[gerhard at ws01 ~]$ echo "Server = ${serverurl/\$repo/$repo}"
Server = ftp://ftp.he.de/mirror/core/os/i686

Cause this code section is commented already as a "hack" maybe it's
better to have a solution where we split the $serverurl to get only the
absolute mirror URL path (ex: ftp://ftp.he.de/mirror) and build from
that our download line for the core repo (ex: "$url/core/os/$ARCH), so
we avoid regexe's.
Only the core repo needs a "extra" handling, all other repos (if there
are any!) uses the pacman.d/mirrorlist method.

Regards
	Gerhard


More information about the arch-releng mailing list