summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO/BuildRoot.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MGA/DrakISO/BuildRoot.pm')
-rw-r--r--lib/MGA/DrakISO/BuildRoot.pm11
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";
}