[arch-releng] AIF [PATCH 1/2] Fix URL parsing for core repo
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@ws01 ~]$ serverurl='ftp://ftp.he.de/mirror/$repo/os/i686' [gerhard@ws01 ~]$ echo $serverurl ftp://ftp.he.de/mirror/$repo/os/i686 [gerhard@ws01 ~]$ repo=core old code: --------- [gerhard@ws01 ~]$ echo "Server = ${serverurl/\/\$repo\//\/$repo\/}" Server = ftp://ftp.he.de/mirror\/core\/os/i686 patched: [gerhard@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
Uups, seems the patches are not attached.... Sorry
On Sun, 01 Mar 2009 20:59:00 +0100 Gerhard Brauer <gerbra@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@ws01 ~]$ serverurl='ftp://ftp.he.de/mirror/$repo/os/i686' [gerhard@ws01 ~]$ echo $serverurl ftp://ftp.he.de/mirror/$repo/os/i686 [gerhard@ws01 ~]$ repo=core
old code: --------- [gerhard@ws01 ~]$ echo "Server = ${serverurl/\/\$repo\//\/$repo\/}" Server = ftp://ftp.he.de/mirror\/core\/os/i686
patched: [gerhard@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
Dieter, have you seen the attachements (git patches) on both of my mails? In sent folder the have the attachements, but my mails getting on the ML i don#t see the attached files...
Gerhard Brauer wrote:
Dieter, have you seen the attachements (git patches) on both of my mails? In sent folder the have the attachements, but my mails getting on the ML i don#t see the attached files...
I didn't receive the patches either. You might want to look into "git send-email" so thing are sent inline rather than as attachments. It makes commenting on patches a lot easier. Allan
On Sun, 01 Mar 2009 21:24:22 +0100 Gerhard Brauer <gerbra@archlinux.de> wrote:
Dieter, have you seen the attachements (git patches) on both of my mails? In sent folder the have the attachements, but my mails getting on the ML i don#t see the attached files...
That's odd. No attachments here. Dieter
On Sun, Mar 01, 2009 at 09:24:22PM +0100, Gerhard Brauer wrote:
Dieter, have you seen the attachements (git patches) on both of my mails? In sent folder the have the attachements, but my mails getting on the ML i don#t see the attached files...
I see the patch just fine here: diff --git a/src/core/libs/lib-pacman.sh b/src/core/libs/lib-pacman.sh index 4497074..35016ad 100644 --- a/src/core/libs/lib-pacman.sh +++ b/src/core/libs/lib-pacman.sh @@ -78,7 +78,7 @@ do then add_pacman_repo target ${repo} "Include = $var_MIRRORLIST" else - add_pacman_repo target ${repo} "Server = ${serverurl/\/\$repo \//\/$repo\/}" # replace literal '/$repo/' in the serverurl string by "/$repo/" where $repo is our variable. + add_pacman_repo target ${repo} "Server = ${serverurl/\$repo/$repo}" # replace literal '/$repo/' in the serverurl string by "/$repo/" where $repo is our variable. fi done # Set up the necessary directories for pacman use -- Greg
Patch, this time inline: ---------------
From 130488d0fbd867cafe327d6d21c8554dcc8a81d1 Mon Sep 17 00:00:00 2001 From: Gerhard Brauer <gerbra@archlinux.de> Date: Sun, 1 Mar 2009 20:31:36 +0100 Subject: [PATCH 1/2] Fix URL parsing for core repo
Old code places backslashes into the URL, so the core.db.tar.gz could not fetched from the mirror when using ftp install. Signed-off-by: Gerhard Brauer <gerbra@archlinux.de> --- src/core/libs/lib-pacman.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/core/libs/lib-pacman.sh b/src/core/libs/lib-pacman.sh index 4497074..35016ad 100644 --- a/src/core/libs/lib-pacman.sh +++ b/src/core/libs/lib-pacman.sh @@ -78,7 +78,7 @@ do then add_pacman_repo target ${repo} "Include = $var_MIRRORLIST" else - add_pacman_repo target ${repo} "Server = ${serverurl/\/\$repo \//\/$repo\/}" # replace literal '/$repo/' in the serverurl string by "/$repo/" where $repo is our variable. + add_pacman_repo target ${repo} "Server = ${serverurl/\$repo/$repo}" # replace literal '/$repo/' in the serverurl string by "/$repo/" where $repo is our variable. fi done # Set up the necessary directories for pacman use -- 1.6.1.3
participants (4)
-
Allan McRae
-
Dieter Plaetinck
-
Gerhard Brauer
-
Grigorios Bouzakis