beakerlib/fix-unbound-variables.patch

51 lines
1.3 KiB
Diff
Raw Normal View History

From 57ad9345c5fb4d893de7a969c7a83826c4476a93 Mon Sep 17 00:00:00 2001
From: Dalibor Pospisil <dapospis@redhat.com>
Date: Mon, 3 Jun 2019 16:39:42 +0200
Subject: [PATCH] fix unbound variables
---
src/beakerlib.sh | 6 ++++++
src/rpms.sh | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/beakerlib.sh b/src/beakerlib.sh
index c123e3d..de54a63 100644
--- a/src/beakerlib.sh
+++ b/src/beakerlib.sh
@@ -31,6 +31,7 @@
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+__INTERNAL_SOURCED=${__INTERNAL_SOURCED-}
echo "${__INTERNAL_SOURCED}" | grep -qF -- " ${BASH_SOURCE} " && return || __INTERNAL_SOURCED+=" ${BASH_SOURCE} "
: <<'=cut'
@@ -410,6 +411,11 @@ export __INTERNAL_PERSISTENT_TMP=/var/tmp
test -f /etc/profile.d/cobbler.sh && . /etc/profile.d/cobbler.sh
set -e
+BEAKERLIB_DIR=${BEAKERLIB_DIR-}
+TESTID=${TESTID-}
+JOBID=${JOBID-}
+RECIPEID=${RECIPEID-}
+BEAKERLIB_JOURNAL=${BEAKERLIB_JOURNAL-}
export BEAKERLIB=${BEAKERLIB:-"/usr/share/beakerlib"}
. $BEAKERLIB/storage.sh
. $BEAKERLIB/infrastructure.sh
diff --git a/src/rpms.sh b/src/rpms.sh
index 144275c..3b55473 100644
--- a/src/rpms.sh
+++ b/src/rpms.sh
@@ -533,7 +533,7 @@ rlAssertRequired(){
}
-: <<=cut
+: <<'=cut'
=pod
=head2 Getting RPMs
--
2.21.0