aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-25 23:45:19 +0000
committerOlivier Blin <blino@mageia.org>2010-11-25 23:45:19 +0000
commit56be319bdbd7cf3b778868d4bc99e86372798eb6 (patch)
tree79b54710c63358f9da5923104d5fee7049742857 /lib
parent48aabd48f626c39d09de8eaa3e6ea2e799126344 (diff)
downloadiurt-56be319bdbd7cf3b778868d4bc99e86372798eb6.tar
iurt-56be319bdbd7cf3b778868d4bc99e86372798eb6.tar.gz
iurt-56be319bdbd7cf3b778868d4bc99e86372798eb6.tar.bz2
iurt-56be319bdbd7cf3b778868d4bc99e86372798eb6.tar.xz
iurt-56be319bdbd7cf3b778868d4bc99e86372798eb6.zip
fix indentation
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Chroot.pm60
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 329c02f..7a183bd 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -425,37 +425,37 @@ sub create_chroot {
plog('NOTIFY', "creating chroot");
plog('DEBUG', "... with packages " . join(', ', @{$opt->{packages}}));
- mkdir_p($tmp_chroot);
- if (!-f $chroot_tar) {
- plog("rebuild chroot tarball");
- $rebuild = 1;
- } else {
- link $chroot_tar, $tmp_tar or die "FATAL: could not initialize chroot ($!)\n";
-
- plog('DEBUG', "decompressing /var/log/qa from $chroot_tar in $tmp_chroot");
- sudo($run, $config, '--untar', $chroot_tar, $tmp_chroot, "./var/log/qa");
-
- my $tmp_urpmi = mktemp("$chroot.tmp.XXXXXX");
- my @installed_pkgs = 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);
- rm_rf($tmp_urpmi);
-
- if (@installed_pkgs) {
- if (@removed_pkgs) {
- plog('DEBUG', "changed packages: @removed_pkgs");
- plog('NOTIFY', "Rebuilding chroot tarball");
- $rebuild = 1;
- } else {
- plog('NOTIFY', "chroot tarball is already up-to-date");
- link $tmp_tar, $chroot_tar;
- }
- } else {
- plog('DEBUG', "can't open $tmp_chroot/var/log/qa");
- plog('ERR', "can't check chroot, recreating");
+ mkdir_p($tmp_chroot);
+ if (!-f $chroot_tar) {
+ plog("rebuild chroot tarball");
+ $rebuild = 1;
+ } else {
+ link $chroot_tar, $tmp_tar or die "FATAL: could not initialize chroot ($!)\n";
+
+ plog('DEBUG', "decompressing /var/log/qa from $chroot_tar in $tmp_chroot");
+ sudo($run, $config, '--untar', $chroot_tar, $tmp_chroot, "./var/log/qa");
+
+ my $tmp_urpmi = mktemp("$chroot.tmp.XXXXXX");
+ my @installed_pkgs = 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);
+ rm_rf($tmp_urpmi);
+
+ if (@installed_pkgs) {
+ if (@removed_pkgs) {
+ plog('DEBUG', "changed packages: @removed_pkgs");
+ plog('NOTIFY', "Rebuilding chroot tarball");
$rebuild = 1;
- }
- }
+ } else {
+ plog('NOTIFY', "chroot tarball is already up-to-date");
+ link $tmp_tar, $chroot_tar;
+ }
+ } else {
+ plog('DEBUG', "can't open $tmp_chroot/var/log/qa");
+ plog('ERR', "can't check chroot, recreating");
+ $rebuild = 1;
+ }
+ }
if ($rebuild) {
if (!build_chroot($run, $config, $tmp_chroot, $chroot_tar, $opt)) {