aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Chroot.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-24 15:36:34 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-24 15:36:34 +0000
commit43447dae9a616c92bd4ca5910002d162c06a611f (patch)
tree7310fed1ccf3835949ff461dcec5206c1de3713a /lib/Iurt/Chroot.pm
parentb1a4966c165963b91436bcce74d7d5d69b4aa510 (diff)
downloadiurt-43447dae9a616c92bd4ca5910002d162c06a611f.tar
iurt-43447dae9a616c92bd4ca5910002d162c06a611f.tar.gz
iurt-43447dae9a616c92bd4ca5910002d162c06a611f.tar.bz2
iurt-43447dae9a616c92bd4ca5910002d162c06a611f.tar.xz
iurt-43447dae9a616c92bd4ca5910002d162c06a611f.zip
perl_checker cleanups
Diffstat (limited to 'lib/Iurt/Chroot.pm')
-rw-r--r--lib/Iurt/Chroot.pm10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 77a1463..f5d9880 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -55,7 +55,7 @@ sub clean_chroot {
open(my $FP, "/proc/mounts") or die $!;
my @list = grep { /$chroot/ } <$FP>;
close($FP);
- if ($#list >= 0) {
+ if (@list >= 0) {
# Still referenced
return 1;
}
@@ -180,7 +180,6 @@ sub dump_rpmmacros {
sub add_local_user {
my ($chroot_tmp, $run, $config, $luser, $uid) = @_;
- my $program_name = $run->{program_name};
# change the builder user to the local user id
# FIXME it seems that unionfs does not handle well the change of the
@@ -205,10 +204,7 @@ sub add_local_user {
}
sub create_temp_chroot {
- my ($run, $config, $cache, $chroot_tmp, $chroot_tar, $o_srpm) = @_;
-
- my $home = $config->{local_home};
- my $debug_tag = $run->{debug_tag};
+ my ($run, $config, $_cache, $chroot_tmp, $chroot_tar, $o_srpm) = @_;
plog("Install new chroot");
plog('DEBUG', "... in $chroot_tmp");
@@ -328,7 +324,7 @@ sub create_chroot {
sudo($run, $config, '--untar', $chroot_tar, $tmp_chroot, "./var/log/qa");
my $tmp_urpmi = mktemp("$chroot.tmp.XXXXXX");
- my @installed_pkgs = grep(!/^gpg-pubkey/, chomp_(cat_("$tmp_chroot/var/log/qa")));
+ 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);
rm_rf($tmp_urpmi);