1From c59b84ca3bda8e4244d47901b6966f28dd675434 Mon Sep 17 00:00:00 2001
2From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
3Date: Thu, 23 May 2013 15:12:23 +0300
4Subject: [PATCH] added yocto-standard to bastille
5
6In order to make Bastille functional and avoid errors
7regarding distros, if not any given distro is identified,
8yocto-standard distro is added to the distro variable
9in Bastille.
10
11Fixed also some warnings regarding defined statements
12in API.pm.
13
14Upstream-Status: Inappropriate [No upstream maintenance]
15
16Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
17
18Signed-off-by: Anne Mulhern <mulhern@yoctoproject.org>
19
20---
21 Bastille/API.pm |   12 ++++++------
22 1 file changed, 6 insertions(+), 6 deletions(-)
23
24Index: Bastille/Bastille/API.pm
25===================================================================
26--- Bastille.orig/Bastille/API.pm	2008-09-14 19:56:53.000000000 -0400
27+++ Bastille/Bastille/API.pm	2013-08-21 08:55:26.715950001 -0400
28@@ -445,8 +445,8 @@
29 		$release=`/usr/bin/uname -sr`;
30 	    }
31 	    else {
32-	 	print STDERR "$err Could not determine operating system version!\n";
33-		$distro="unknown";
34+                print STDERR "$err Could not determine operating system version!\n";
35+		$distro="unknown"
36             }
37
38 	    # Figure out what kind of system we're on.
39@@ -1284,7 +1284,7 @@
40
41     my $sumFile = &getGlobal('BFILE',"sum.csv");
42
43-    if ( defined %GLOBAL_SUM ) {
44+    if ( %GLOBAL_SUM ) {
45
46 	open( SUM, "> $sumFile") or &B_log("ERROR","Unable to open $sumFile for write.\n$!\n");
47
48@@ -1318,7 +1318,7 @@
49     my $file = $_[0];
50     my $cksum = &getGlobal('BIN',"cksum");
51
52-    if (not(defined(%GLOBAL_SUM))) {
53+    if (not(%GLOBAL_SUM)) {
54         &B_read_sums;
55     }
56
57@@ -1375,7 +1375,7 @@
58 sub B_isFileinSumDB($) {
59     my $file = $_[0];
60
61-    if (not(defined(%GLOBAL_SUM))) {
62+    if (not(%GLOBAL_SUM)) {
63         &B_log("DEBUG","Reading in DB from B_isFileinSumDB");
64         &B_read_sums;
65     }
66