diff options
Diffstat (limited to 'lib/Iurt/Chroot.pm')
-rw-r--r-- | lib/Iurt/Chroot.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 53649ac..25829b5 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -525,8 +525,10 @@ sub build_chroot { sudo($run, $config, '--cp', "/etc/resolv.conf", "$tmp_chroot/etc/"); sudo($run, $config, "--initdb", $tmp_chroot); + # install chroot my $urpmi = $run->{urpmi}; + $urpmi->set_command($tmp_chroot); # 20060826 warly urpmi --root does not work properly @@ -547,6 +549,10 @@ sub build_chroot { return 0; } + # remove files used by --urpmi-root + sudo($run, $config, "--rm", "$tmp_chroot/etc/urpmi/urpmi.cfg"); + sudo($run, $config, "--rm", "$tmp_chroot/var/lib/urpmi/*"); + system($sudo, 'sh', '-c', "chroot $tmp_chroot rpm -qa --qf '\%{NAME}-\%{VERSION}-\%{RELEASE}.\%{ARCH}.rpm\n' > $tmp_chroot/var/log/qa"); # # CM: Choose a sub-500 uid to prevent collison with $luser |