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

Dieter Plaetinck dieter at plaetinck.be
Sun Mar 1 15:17:16 EST 2009


On Sun, 01 Mar 2009 20:59:00 +0100
Gerhard Brauer <gerbra at archlinux.de> wrote:

> 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


Good find. odd because I think I tested that.
Note that the "this is a hack" comment refers to the fact if the cdrom
is choosen as package source, we switch to ftp for non-core
repositories, because the cdrom only hosts core packages. I think the
swapping in and out of $repo is pretty clean (conceptually).

Your fix is now in the experimental tree :)

PS: note, if you're playing further with aif I just would like to
mention that in experimental everything should work fine, except the
date/time setting that's broken right now. (you can just skip that step
though)

Dieter


More information about the arch-releng mailing list