aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Patard <rtp@mageia.org>2012-12-14 11:21:43 +0000
committerArnaud Patard <rtp@mageia.org>2012-12-14 11:21:43 +0000
commitade7d52967159069bc0f80ea6c798ce3d1afa082 (patch)
treee216dbf2050a8b96a6b9eaeea8affc2b4552ef6a
parente6beea28823ada54c84ea6cee9a691ab13422390 (diff)
downloadiurt-ade7d52967159069bc0f80ea6c798ce3d1afa082.tar
iurt-ade7d52967159069bc0f80ea6c798ce3d1afa082.tar.gz
iurt-ade7d52967159069bc0f80ea6c798ce3d1afa082.tar.bz2
iurt-ade7d52967159069bc0f80ea6c798ce3d1afa082.tar.xz
iurt-ade7d52967159069bc0f80ea6c798ce3d1afa082.zip
- fix check_chroot_need_update which was always telling to rebuild the chroot,
due to urpmi not being able to write to $urpmi_root/tmp some temp files (thus returning an empty package list).
-rw-r--r--lib/Iurt/Chroot.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 447ef23..a3f314c 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -278,6 +278,7 @@ sub check_chroot_need_update {
my ($tmp_chroot, $run) = @_;
my $tmp_urpmi = mktemp("$tmp_chroot/tmp.XXXXXX");
+ mkdir_p("$tmp_urpmi/tmp");
my @installed_pkgs = grep { !/^gpg-pubkey/ } chomp_(cat_("$tmp_chroot/var/log/qa"));
my @available_pkgs = chomp_(`urpmq --urpmi-root $tmp_urpmi --use-distrib $run->{urpmi}{distrib_url} --list -f 2>/dev/null`);
my @removed_pkgs = difference2(\@installed_pkgs, \@available_pkgs);