From: Pat Riehecky riehecky@fnal.gov
rpmbuild fails to parse specfiles that have the SCL macros in them when the basic macros are not defined. I didn't really see a way around forcing them into place when needed.
Check out any of the SCL 1.1 repos and try return_disttag.sh without scl-utils-build installed, it is unable to extract the dist tag as RPM things the spec is not correctly setup.
Pat Riehecky (1): SCL macros can prevent rpmbuild from examining some spec files.
into_srpm.sh | 8 ++++++++ return_disttag.sh | 6 ++++++ 2 files changed, 14 insertions(+), 0 deletions(-)
From: Pat Riehecky riehecky@fnal.gov
--- into_srpm.sh | 8 ++++++++ return_disttag.sh | 6 ++++++ 2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/into_srpm.sh b/into_srpm.sh index 8c2434c..a0b2d6e 100755 --- a/into_srpm.sh +++ b/into_srpm.sh @@ -134,6 +134,14 @@ if [[ $? -ne 0 ]]; then exit 1 fi
+if [[ ${ALLOWSCL} -eq 1 ]]; then + rpm -q scl-utils-build >/dev/null 2>&1 + if [[ $? -ne 0 ]]; then + echo 'Without scl-utils-build some SCL style sources be parsed' >&2 + exit 1 + fi +fi + # Set us to requested branch for further operations if [[ "x${BRANCH}" != 'x' ]]; then if [[ $QUIET -eq 1 ]]; then diff --git a/return_disttag.sh b/return_disttag.sh index dcde8e8..e846692 100755 --- a/return_disttag.sh +++ b/return_disttag.sh @@ -76,6 +76,12 @@ if [[ ! -d .git ]] || [[ ! -d SPECS ]]; then exit 1 fi
+rpm -q scl-utils-build >/dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo 'Without scl-utils-build some SCL style sources be parsed' >&2 + exit 1 +fi + # check metadata file and extract package name packagename="" shopt -s nullglob
On 07/21/2014 03:04 PM, Pat Riehecky wrote:
From: Pat Riehecky riehecky@fnal.gov
into_srpm.sh | 8 ++++++++ return_disttag.sh | 6 ++++++ 2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/into_srpm.sh b/into_srpm.sh index 8c2434c..a0b2d6e 100755 --- a/into_srpm.sh +++ b/into_srpm.sh @@ -134,6 +134,14 @@ if [[ $? -ne 0 ]]; then exit 1 fi
+if [[ ${ALLOWSCL} -eq 1 ]]; then
- rpm -q scl-utils-build >/dev/null 2>&1
- if [[ $? -ne 0 ]]; then
echo 'Without scl-utils-build some SCL style sources be parsed' >&2
exit 1
- fi
+fi
# Set us to requested branch for further operations if [[ "x${BRANCH}" != 'x' ]]; then if [[ $QUIET -eq 1 ]]; then diff --git a/return_disttag.sh b/return_disttag.sh index dcde8e8..e846692 100755 --- a/return_disttag.sh +++ b/return_disttag.sh @@ -76,6 +76,12 @@ if [[ ! -d .git ]] || [[ ! -d SPECS ]]; then exit 1 fi
+rpm -q scl-utils-build >/dev/null 2>&1 +if [[ $? -ne 0 ]]; then
- echo 'Without scl-utils-build some SCL style sources be parsed' >&2
- exit 1
+fi
# check metadata file and extract package name packagename="" shopt -s nullglob
pushed
On Mon, Jul 21, 2014 at 4:04 PM, Pat Riehecky riehecky@fnal.gov wrote:
+rpm -q scl-utils-build >/dev/null 2>&1 +if [[ $? -ne 0 ]]; then
- echo 'Without scl-utils-build some SCL style sources be parsed' >&2
- exit 1
+fi
Don't you mean 'cannot be parsed' ?
On 07/22/2014 06:43 PM, Nico Kadel-Garcia wrote:
On Mon, Jul 21, 2014 at 4:04 PM, Pat Riehecky riehecky@fnal.gov wrote:
+rpm -q scl-utils-build >/dev/null 2>&1 +if [[ $? -ne 0 ]]; then
- echo 'Without scl-utils-build some SCL style sources be parsed' >&2
- exit 1
+fi
Don't you mean 'cannot be parsed' ?
.... err yes......