From 36d55668ee6633e6d92dc8f4df74699e8757a4c9 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 18 Nov 2018 19:38:06 +0000 Subject: Avoid full file path appearing in ISO checksum files. --- lib/MGA/DrakISO/BuildISO.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/MGA/DrakISO') diff --git a/lib/MGA/DrakISO/BuildISO.pm b/lib/MGA/DrakISO/BuildISO.pm index 532b0db..c905f1e 100644 --- a/lib/MGA/DrakISO/BuildISO.pm +++ b/lib/MGA/DrakISO/BuildISO.pm @@ -95,7 +95,9 @@ sub build_iso_image { my $build_dir = $build->get_build_dir('dist'); mkdir_p($build_dir); - my $dest = $build_dir . '/' . $build->get_name . '.iso'; + my $iso_name = $build->get_name . '.iso'; + + my $dest = $build_dir . '/' . $iso_name; my $xorriso_version = `xorriso -version 2> /dev/null | head -1`; chomp($xorriso_version); @@ -140,9 +142,9 @@ sub build_iso_image { ) or die "ERROR: unable to run xorrisofs\n"; run_("mgaiso-addmd5 $dest > /dev/null 2> /dev/null"); - run_("md5sum $dest > $dest.md5"); - run_("sha1sum $dest > $dest.sha1"); - run_("sha512sum $dest > $dest.sha512"); + run_("cd $build_dir && md5sum $iso_name > $iso_name.md5"); + run_("cd $build_dir && sha1sum $iso_name > $iso_name.sha1"); + run_("cd $build_dir && sha512sum $iso_name > $iso_name.sha512"); if (my $suffix = $build->get_set_suffix) { if (my ($prefix, $ext) = $dest =~ /(.*)(\.[^.]+)$/) { my $link = $prefix . $suffix . $ext; -- cgit v1.2.1