From 3af539e70a1f032b4e4cb8a94e6e0237946d3aa0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 20 Sep 2011 13:22:50 +0000 Subject: [PATCH] Work on 3.1 packager --- build/makepack-dolibarr.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index bbdb3235480..cd16eb72155 100644 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -162,7 +162,17 @@ else { # Test if requirement is ok #-------------------------- +$atleastonerpm=0; foreach my $target (keys %CHOOSEDTARGET) { + if ($target =~ /RPM/i) + { + if ($atleastonerpm && ! $ENV{"DESTI"}) + { + print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell package it must create subdirs for each package.\n"; + exit; + } + $atleastonerpm=1; + } foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target})) { # Test print "Test requirement for target $target: Search '$req'... ";