summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,