summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/attachments/20120906/e58a4a45/attachment-0001.obj
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-04-14 13:46:12 +0000
committerNicolas Vigier <boklm@mageia.org>2013-04-14 13:46:12 +0000
commit1be510f9529cb082f802408b472a77d074b394c0 (patch)
treeb175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-dev/attachments/20120906/e58a4a45/attachment-0001.obj
parentfa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff)
downloadarchives-master.tar
archives-master.tar.gz
archives-master.tar.bz2
archives-master.tar.xz
archives-master.zip
Add zarb MLs html archivesHEADmaster
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20120906/e58a4a45/attachment-0001.obj')
-rw-r--r--zarb-ml/mageia-dev/attachments/20120906/e58a4a45/attachment-0001.obj44
1 files changed, 44 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/attachments/20120906/e58a4a45/attachment-0001.obj b/zarb-ml/mageia-dev/attachments/20120906/e58a4a45/attachment-0001.obj
new file mode 100644
index 000000000..1e8acc422
--- /dev/null
+++ b/zarb-ml/mageia-dev/attachments/20120906/e58a4a45/attachment-0001.obj
@@ -0,0 +1,44 @@
+diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
+index ba87464..6e95dc0 100644
+--- a/lib/Iurt/Chroot.pm
++++ b/lib/Iurt/Chroot.pm
+@@ -300,23 +300,11 @@ sub check_chroot_need_update {
+
+ sub create_build_chroot {
+ my ($chroot, $chroot_ref, $run, $config) = @_;
+- my $ret = 0;
+ if ($run->{storage} eq 'btrfs') {
+- $ret = create_build_chroot_btrfs($chroot, $chroot_ref, $run, $config);
++ return create_build_chroot_btrfs($chroot, $chroot_ref, $run, $config);
+ } else {
+- $ret = create_build_chroot_tar($chroot, $chroot_ref, $run, $config);
++ return create_build_chroot_tar($chroot, $chroot_ref, $run, $config);
+ }
+-
+- if ($ret) {
+- my $urpmi = $run->{urpmi};
+- if ($urpmi->{use__urpmi_root} && !$run->{chrooted_urpmi}) {
+- if (!$urpmi->add_media__urpmi_root($chroot, $config->{base_media})) {
+- plog('ERROR', "urpmi.addmedia --urpmi-root failed");
+- return;
+- }
+- }
+- }
+- return $ret;
+ }
+
+ sub create_build_chroot_tar {
+@@ -440,8 +428,11 @@ sub build_chroot {
+ }
+
+ # remove files used by --urpmi-root
+- sudo($config, "--rm", "$tmp_chroot/etc/urpmi/urpmi.cfg");
+- sudo($config, "--rm", "$tmp_chroot/var/lib/urpmi/*");
++ #if (!$urpmi->{use__urpmi_root} || $run->{chrooted_urpmi}) {
++ if (!($urpmi->{use__urpmi_root} && !$run->{chrooted_urpmi})) {
++ sudo($config, "--rm", "$tmp_chroot/etc/urpmi/urpmi.cfg");
++ sudo($config, "--rm", "$tmp_chroot/var/lib/urpmi/*");
++ }
+
+ # rpm is not running as root and cannot directly write to $tmp_chroot/var/log/qa
+ system("rpm -qa --root $tmp_chroot --qf '\%{NAME}-\%{VERSION}-\%{RELEASE}.\%{ARCH}\n' | sort > $tmp_chroot/tmp/qa"); \ No newline at end of file