summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-18 19:38:06 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-18 19:38:51 +0000
commit36d55668ee6633e6d92dc8f4df74699e8757a4c9 (patch)
tree7e493851a182c668df3495b82850e59454fb75d6 /lib
parentdc9a8b8fcb0d61dbe641f4c6edf83de26bb5aaca (diff)
downloaddrakiso-36d55668ee6633e6d92dc8f4df74699e8757a4c9.tar
drakiso-36d55668ee6633e6d92dc8f4df74699e8757a4c9.tar.gz
drakiso-36d55668ee6633e6d92dc8f4df74699e8757a4c9.tar.bz2
drakiso-36d55668ee6633e6d92dc8f4df74699e8757a4c9.tar.xz
drakiso-36d55668ee6633e6d92dc8f4df74699e8757a4c9.zip
Avoid full file path appearing in ISO checksum files.
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/DrakISO/BuildISO.pm10
1 files changed, 6 insertions, 4 deletions
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;