From 29cb84b3461f09f4476c4422292e40b4ec5f05a0 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 27 May 2011 21:53:23 +0000 Subject: add a - suffix to chroot/build directories if live->{settings}{set} is defined --- lib/MDV/Draklive/Live.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/MDV/Draklive/Live.pm b/lib/MDV/Draklive/Live.pm index c8618ee..64c0cad 100644 --- a/lib/MDV/Draklive/Live.pm +++ b/lib/MDV/Draklive/Live.pm @@ -13,14 +13,19 @@ sub get_name { join('-', grep { $_ } @{$live->{settings}}{@$fields}); } +sub get_set_suffix { + my ($live) = @_; + $live->{settings}{set} ? "-$live->{settings}{set}" : ""; +} + sub get_builddir { my ($live) = @_; - $live->{settings}{builddir} . '/' . $live->get_name; + $live->{settings}{builddir} . '/' . $live->get_name . $live->get_set_suffix; } sub get_system_root { my ($live) = @_; - $live->{settings}{chroot} . '/' . $live->get_name; + $live->{settings}{chroot} . '/' . $live->get_name . $live->get_set_suffix; } sub get_media_prefix { -- cgit v1.2.1