diff options
author | Marcelo Leitner <mrl@mandriva.com> | 2007-07-04 12:26:24 +0000 |
---|---|---|
committer | Marcelo Leitner <mrl@mandriva.com> | 2007-07-04 12:26:24 +0000 |
commit | aeab684c948ae194c7b9bb425fba0517d7954bc2 (patch) | |
tree | 0e612fa1f60a86da21c117a51d68e47dce522e27 | |
parent | bf64ae7dde7b272b8920ceefcbcccbeef7048ee7 (diff) | |
download | iurt-aeab684c948ae194c7b9bb425fba0517d7954bc2.tar iurt-aeab684c948ae194c7b9bb425fba0517d7954bc2.tar.gz iurt-aeab684c948ae194c7b9bb425fba0517d7954bc2.tar.bz2 iurt-aeab684c948ae194c7b9bb425fba0517d7954bc2.tar.xz iurt-aeab684c948ae194c7b9bb425fba0517d7954bc2.zip |
- added some comments.
-rw-r--r-- | lib/Iurt/Chroot.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 8509124..82840a1 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -375,7 +375,12 @@ sub clean_chroot_tmp { foreach my $m ('proc', 'dev/pts', 'urpmi_medias', 'var/cache/icecream') { if (system("$sudo umount $d/$m &>/dev/null") && $run->{verbose} > 1) { - plog("ERROR: could not umount /$m in $d/"); + plog("ERROR: could not umount /$m in $d/"); + # FIXME: <mrl> We can't go on, otherelse we will remove something + # that we shouldn't. But for that, we should: + # a) Check for all mount-points inside the chroot + # b) Try to unmount only the needed ones, otherelse the errors + # can be misleading. } } @@ -523,6 +528,7 @@ sub build_chroot { @{$opt->{packages}} ); + # FIXME: <mrl> A proper warn could be given here, instead of aborting silently. if (-f "$tmp_chroot/bin/rpm") { system($sudo, 'sh', '-c', "chroot $tmp_chroot rpm -qa --qf '\%{NAME}-\%{VERSION}-\%{RELEASE}.\%{ARCH}.rpm\n' > $tmp_chroot/var/log/qa"); # @@ -535,6 +541,7 @@ sub build_chroot { sudo($run, $config, "--mkdir", "$tmp_chroot/home/builder/rpm/$p"); } system($sudo, 'chown', '-R', 499, "$tmp_chroot/home/builder"); + # FIXME: <mrl> Be careful! Damn ugly hack right below! sudo($run, $config, "--rm", "$tmp_chroot/var/lib/rpm/__db*"); system("$sudo umount $tmp_chroot/proc &> /dev/null"); system("$sudo umount $tmp_chroot/dev/pts &> /dev/null"); |