diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-13 17:41:42 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-14 22:41:08 +0000 |
commit | 81a42ed35e61de32d82ac0e8c406841d5f37d53f (patch) | |
tree | 207a7b62380c0417d0ee5600426be910fd8309e0 /lib/MGA/DrakISO/BuildRoot.pm | |
parent | d1a2765a504a8e86ee4b99bcc03a4c05f026bdbb (diff) | |
download | drakiso-81a42ed35e61de32d82ac0e8c406841d5f37d53f.tar drakiso-81a42ed35e61de32d82ac0e8c406841d5f37d53f.tar.gz drakiso-81a42ed35e61de32d82ac0e8c406841d5f37d53f.tar.bz2 drakiso-81a42ed35e61de32d82ac0e8c406841d5f37d53f.tar.xz drakiso-81a42ed35e61de32d82ac0e8c406841d5f37d53f.zip |
Reduce perl_checker noise.
Diffstat (limited to 'lib/MGA/DrakISO/BuildRoot.pm')
-rw-r--r-- | lib/MGA/DrakISO/BuildRoot.pm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/MGA/DrakISO/BuildRoot.pm b/lib/MGA/DrakISO/BuildRoot.pm index 1e44109..1ee471a 100644 --- a/lib/MGA/DrakISO/BuildRoot.pm +++ b/lib/MGA/DrakISO/BuildRoot.pm @@ -390,8 +390,8 @@ sub build_local_repo { urpm::set_files($urpm, $root); urpm::get_global_options($urpm); - $urpm->{info} = sub { }; - $urpm->{log} = sub { }; + $urpm->{info} = sub {}; + $urpm->{log} = sub {}; urpm::media::configure($urpm, cmdline_skiplist => join(',', @{$build->{system}{exclude_packages} || []})); @@ -435,9 +435,8 @@ sub build_local_repo { my $src_path = $medium[0]->{url} . '/' . $pkg->filename; my @path_parts = split('/', $src_path); my $class = $path_parts[-3]; - my $name = $path_parts[-1]; my $dst_dir = $local_repo_dir . $class; - mkdir_in_root($root, $dst_dir) if ! -d $root . $dst_dir; + mkdir_in_root($root, $dst_dir) if ! -d "$root$dst_dir"; # TODO: support remote repositories copy_to_root($root, $dst_dir, undef, $src_path); $classes{$class} = 1; @@ -519,7 +518,7 @@ sub customise_live_system { # Remove any additional media. if (@{$build->{system}{additional_media}}) { - run_in_root($root, undef, 'urpmi.removemedia', if_($::verbose < 3, '-q'),'-a'); + run_in_root($root, undef, 'urpmi.removemedia', if_($::verbose < 3, '-q'), '-a'); } print "..adding local repository media\n" if $::verbose > 1; @@ -601,7 +600,7 @@ sub customise_live_system { # Apply patches as requested by the user. foreach (@{$build->{system}{patches}}) { my $patch_file = $build->get_absolute_path($_); - my @patch_cmd = ( 'patch', '-p0', '-d', $root, '-i', $patch_file, if_($::verbose < 3, '-s') ); + my @patch_cmd = ('patch', '-p0', '-d', $root, '-i', $patch_file, if_($::verbose < 3, '-s')); run_as_root(join(' ', @patch_cmd, '--dry-run -f -R > /dev/null')) || run_as_root(@patch_cmd) or die "ERROR: unable to apply patch $patch_file\n"; } |