summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpmi.spec8
1 files changed, 5 insertions, 3 deletions
diff --git a/urpmi.spec b/urpmi.spec
index 40dd3566..dd36b418 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -156,9 +156,11 @@ exit 0
%post -p /usr/bin/perl
use urpm;
-$urpm = new urpm;
-$urpm->read_config;
-$urpm->update_media(nolock => 1, nopubkey => 1);
+if (-e "/etc/urpmi/urpmi.cfg") {
+ $urpm = new urpm;
+ $urpm->read_config;
+ $urpm->update_media(nolock => 1, nopubkey => 1);
+}
%if %{allow_gurpmi}
%post -n gurpmi