diff options
author | Olivier Blin <blino@mageia.org> | 2010-11-24 00:14:49 +0000 |
---|---|---|
committer | Olivier Blin <blino@mageia.org> | 2010-11-24 00:14:49 +0000 |
commit | 374707eb2c9bf57e22fa2503b5c80663f0d24787 (patch) | |
tree | 87b2d7ffd11682e95246a9fe3b55a15d33243fca /lib | |
parent | 38f232a31bec8a7d2e0d9b4b806e95f3db7d9c5e (diff) | |
download | iurt-374707eb2c9bf57e22fa2503b5c80663f0d24787.tar iurt-374707eb2c9bf57e22fa2503b5c80663f0d24787.tar.gz iurt-374707eb2c9bf57e22fa2503b5c80663f0d24787.tar.bz2 iurt-374707eb2c9bf57e22fa2503b5c80663f0d24787.tar.xz iurt-374707eb2c9bf57e22fa2503b5c80663f0d24787.zip |
don't resolve hostname in http repository address, using IP address
would break vhosts, and we copy resolv.conf in the chroot anyway
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Iurt/Urpmi.pm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 8a383a5..b28ffcc 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -24,15 +24,15 @@ sub new { if ($run->{use_system_distrib}) { $config->{basesystem_media_root} ||= $run->{use_system_distrib}; } elsif ($run->{chrooted_urpmi}) { - my ($host) = $run->{chrooted_urpmi}{rooted_media} =~ m,(?:file|http|ftp)://([^/]*),; - my ($_name, $_aliases, $_addrtype, $_length, @addrs) = gethostbyname($host); - - my $ip = join('.', unpack('C4', $addrs[0])); - - $ip =~ /\d+\.\d+\.\d+\.\d+/ - or die "FATAL: could not resolve $host ip address"; - - $run->{chrooted_urpmi}{rooted_media} =~ s/$host/$ip/; + #my ($host) = $run->{chrooted_urpmi}{rooted_media} =~ m,(?:file|http|ftp)://([^/]*),; + #my ($_name, $_aliases, $_addrtype, $_length, @addrs) = gethostbyname($host); + # + #my $ip = join('.', unpack('C4', $addrs[0])); + # + #$ip =~ /\d+\.\d+\.\d+\.\d+/ + # or die "FATAL: could not resolve $host ip address"; + # + #$run->{chrooted_urpmi}{rooted_media} =~ s/$host/$ip/; $run->{chrooted_media} = $run->{chrooted_urpmi}{rooted_media} . "/$run->{distro}/$run->{my_arch}"; |