summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rwxr-xr-xurpmi6
2 files changed, 5 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 2b27f202..510463b9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- urpmi
+ o fix --bug when there is no /etc/urpmi/prefer.list file
- urpmf
o display "usage" when no <pattern-expression> is given (#32658)
diff --git a/urpmi b/urpmi
index b512958e..b910617b 100755
--- a/urpmi
+++ b/urpmi
@@ -241,9 +241,9 @@ if ($bug) {
? N("Directory [%s] already exists, please use another directory for bug report or delete it", $bug)
: N("Unable to create directory [%s] for bug report", $bug)));
#- copy all synthesis file used, along with configuration of urpmi
- system("cp", "-af", $urpm->{skiplist}, $urpm->{instlist},
- $urpm->{prefer_list}, $urpm->{prefer_vendor_list},
- $urpm->{config}, $bug)
+ my @list_files = grep { -e $_ } $urpm->{skiplist}, $urpm->{instlist},
+ $urpm->{prefer_list}, $urpm->{prefer_vendor_list};
+ system("cp", "-af", @list_files, $urpm->{config}, $bug)
and die N("Copying failed");
#- log everything for bug report.
$logfile = "$bug/urpmi.log";