Define the de-facto %opensuse_bs macro from OBS to be zero
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 2 Aug 2013 07:47:18 +0000 (10:47 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 2 Aug 2013 08:32:44 +0000 (11:32 +0300)
The %opensuse_bs macro is virtually always defined in OBS prjconf.
Define this macro to be 0 in depanneur so that it can be used in spec
file to distinguish between local (e.g. "gbs build" or "rpmbuild") and
OBS server builds.

Change-Id: Iffdd917a7bc2a460d76f2e973498896cc9fd7b2a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
depanneur

index 8213917..f51c37d 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -430,6 +430,8 @@ my @archs = @{$archpolicies{$arch}};
 my $archpath = join(":", @archs);
 
 my $config = Build::read_config_dist($dist, $archpath, $dist_configs);
+# We're not building inside OBS, set the de-facto "obs macro" accordingly
+push @{$config->{'macros'}}, "%define opensuse_bs 0";
 
 if ( -d "$packaging_dir" && -d ".git" ) {
     $package_path = cwd();