summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-15 19:37:50 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-15 19:37:50 +0000
commitad76212fc77de537513f97bd008d501725d6f742 (patch)
treed9faaed96a64877a9adde8a4daa574c7ec67eee6 /urpm.pm
parentcc335323bbc36915e8764d3897030a55f2ebe52f (diff)
downloadurpmi-ad76212fc77de537513f97bd008d501725d6f742.tar
urpmi-ad76212fc77de537513f97bd008d501725d6f742.tar.gz
urpmi-ad76212fc77de537513f97bd008d501725d6f742.tar.bz2
urpmi-ad76212fc77de537513f97bd008d501725d6f742.tar.xz
urpmi-ad76212fc77de537513f97bd008d501725d6f742.zip
Fix parsing of hdlists file when adding media with --distrib (bug 13644)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index 7024a273..43de422c 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -768,9 +768,11 @@ sub add_distrib_media {
s/\s*#.*$//;
/^\s*$/ and next;
/^(?:suppl|askmedia)/ and next;
- m/^\s*(noauto:)?(hdlist\S*\.cz2?)\s+(\S+)\s*(.*)$/ or $urpm->{error}(N("invalid hdlist description \"%s\" in hdlists file", $_));
- my ($noauto, $hdlist, $rpmsdir, $descr) = ($1, $2, $3);
+ /^\s*(noauto:)?(hdlist\S*\.cz2?)\s+(\S+)\s*([^(]*)(\(.+\))?$/
+ or $urpm->{error}(N("invalid hdlist description \"%s\" in hdlists file", $_));
+ my ($noauto, $hdlist, $rpmsdir, $descr) = ($1, $2, $3, $4);
next if $noauto;
+ $descr =~ s/\s+$//;
push @newnames, $urpm->add_medium(
$name ? "$descr ($name$medium)" : $descr,