aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-22 16:17:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-22 16:17:32 +0000
commit9a9f1c9b58b7286cdb58feb2072a7e4aae48d938 (patch)
tree3c207a64aa0b0410582d58c040a1b23bb95295dd
parent5189d08dfa1cc557d5a4ad53249d2b7bd9005399 (diff)
downloadiurt-9a9f1c9b58b7286cdb58feb2072a7e4aae48d938.tar
iurt-9a9f1c9b58b7286cdb58feb2072a7e4aae48d938.tar.gz
iurt-9a9f1c9b58b7286cdb58feb2072a7e4aae48d938.tar.bz2
iurt-9a9f1c9b58b7286cdb58feb2072a7e4aae48d938.tar.xz
iurt-9a9f1c9b58b7286cdb58feb2072a7e4aae48d938.zip
prepare for --urpmi-root:
- remove files used by --urpmi-root (created by urpmi.addmedia --urpmi--root)
-rw-r--r--lib/Iurt/Chroot.pm6
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