[pacman-dev] [PATCH 1/3] rankmirror: pipe errors to stderr
If this is to be scripted with AIF or another tool, it needs to respect stderr. Signed-off-by: Andres P <aepd87@gmail.com> --- scripts/rankmirrors.sh.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/rankmirrors.sh.in b/scripts/rankmirrors.sh.in index 9b4e973..283fb46 100644 --- a/scripts/rankmirrors.sh.in +++ b/scripts/rankmirrors.sh.in @@ -49,7 +49,7 @@ version() { } err() { - echo "$1" + echo "$1" >&2 exit 1 } -- 1.7.1
Valid pacman configuration files do not have to start with a hash for that line to be a comment, neither do directives need to be in column 0. Signed-off-by: Andres P <aepd87@gmail.com> --- scripts/rankmirrors.sh.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rankmirrors.sh.in b/scripts/rankmirrors.sh.in index 283fb46..6170a22 100644 --- a/scripts/rankmirrors.sh.in +++ b/scripts/rankmirrors.sh.in @@ -184,9 +184,9 @@ fi timesarray=() for line in "${linearray[@]}"; do - if [[ $line =~ ^# ]]; then + if [[ $line =~ ^[[:space:]]*# ]]; then [[ $TIMESONLY ]] || echo $line - elif [[ $line =~ ^Server ]]; then + elif [[ $line =~ ^[[:space:]]*Server ]]; then # Getting values and times and such server="${line#*= }" -- 1.7.1
On 23/06/10 12:42, Andres P wrote:
Valid pacman configuration files do not have to start with a hash for that line to be a comment, neither do directives need to be in column 0.
Signed-off-by: Andres P<aepd87@gmail.com>
Signed-off-by: Allan On my working branch. I'd say this is a candidate for maint as it appears a regression on the python script. Allan
On Tue, Jun 22, 2010 at 10:10 PM, Allan McRae <allan@archlinux.org> wrote:
On 23/06/10 12:42, Andres P wrote:
Valid pacman configuration files do not have to start with a hash for that line to be a comment, neither do directives need to be in column 0.
Signed-off-by: Andres P<aepd87@gmail.com>
Signed-off-by: Allan
On my working branch. I'd say this is a candidate for maint as it appears a regression on the python script.
Yeah I marked the bug as such (scheduled for 3.4.1). Thanks. -Dan
$replacedurl was being built from an expansion of itself. But at the time it happened, it was empty. Fixes FS#19911 Signed-off-by: Andres P <aepd87@gmail.com> --- scripts/rankmirrors.sh.in | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/rankmirrors.sh.in b/scripts/rankmirrors.sh.in index 6170a22..b0dc1ab 100644 --- a/scripts/rankmirrors.sh.in +++ b/scripts/rankmirrors.sh.in @@ -70,15 +70,15 @@ ARCH="$(uname -m)" getfetchurl() { local strippedurl="${1%/}" - local replacedurl="${replacedurl//'$arch'/$ARCH}" + local replacedurl="${strippedurl//'$arch'/$ARCH}" if [[ ! $TARGETREPO ]]; then - replacedurl="${strippedurl//'$repo'/core}" + replacedurl="${replacedurl//'$repo'/core}" local tmp="${replacedurl%/*}" tmp="${tmp%/*}" local reponame="${tmp##*/}" else - replacedurl="${strippedurl//'$repo'/$TARGETREPO}" + replacedurl="${replacedurl//'$repo'/$TARGETREPO}" local reponame="$TARGETREPO" fi -- 1.7.1
On 23/06/10 12:42, Andres P wrote:
$replacedurl was being built from an expansion of itself. But at the time it happened, it was empty.
Fixes FS#19911
Signed-off-by: Andres P<aepd87@gmail.com>
Signed-off-by: Allan. On my working-maint branch.
On 23/06/10 12:42, Andres P wrote:
If this is to be scripted with AIF or another tool, it needs to respect stderr.
Signed-off-by: Andres P<aepd87@gmail.com> ---
Signed-off-by: Allan On my working branch.
participants (3)
-
Allan McRae
-
Andres P
-
Dan McGee