aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-10-13 15:01:43 +0000
committerThierry Vignaud <tv@mandriva.org>2006-10-13 15:01:43 +0000
commit5300283574398df8195a270ab26b20dd656b7be5 (patch)
tree245e5bd71fac1dadad2ee35968c82f9ca87de513
parentba2b8cdb14141f929b0ef0b04d0e24c1f2b04b0a (diff)
downloadrpmdrake-5300283574398df8195a270ab26b20dd656b7be5.tar
rpmdrake-5300283574398df8195a270ab26b20dd656b7be5.tar.gz
rpmdrake-5300283574398df8195a270ab26b20dd656b7be5.tar.bz2
rpmdrake-5300283574398df8195a270ab26b20dd656b7be5.tar.xz
rpmdrake-5300283574398df8195a270ab26b20dd656b7be5.zip
(get_pkgs) if /etc/urpmi/urpmi.cfg doesn't exists, create an empty
config file and run edit-urpm-sources instead (#26533)
-rwxr-xr-xrpmdrake4
1 files changed, 4 insertions, 0 deletions
diff --git a/rpmdrake b/rpmdrake
index 77c76f05..170e3b02 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -1442,6 +1442,10 @@ sub get_pkgs {
$urpm->{fatal} = $fatal_handler;
my $media = ref $options{media} ? join(',', @{$options{media}}) : '';
$urpm->configure(media => $media);
+ if ($error_happened) {
+ touch('/etc/urpmi/urpmi.cfg');
+ exec('edit-urpm-sources.pl');
+ }
}
my $statedir = $urpm->{statedir};
@update_medias = grep { !$_->{ignore} && $_->{update} } @{$urpm->{media}};