From 5d5eac137ce062dd2d8dbfe77ddb25cae8422efa Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 2 Aug 2017 11:00:01 +0100 Subject: [PATCH] %ghc_gen_filelists: check package.conf exists --- ghc-rpm-macros.spec | 3 +++ macros.ghc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9dd5365..314c8d0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -162,6 +162,9 @@ EOF %changelog +* Wed Aug 2 2017 Jens Petersen +- ghc_gen_filelists: check package.conf exists + * Sun Jul 30 2017 Jens Petersen - 1.6.20-2 - make package noarch again for f27 diff --git a/macros.ghc b/macros.ghc index 257bcad..a64b865 100644 --- a/macros.ghc +++ b/macros.ghc @@ -73,6 +73,10 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ +if [ ! -f "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" ]; then\ +echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found"\ +exit 1\ +fi\ pkgconf=$(echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf")\ key=$(grep "key: " %{buildroot}${pkgconf} | sed -e "s/key: //")\ pkgdir="%{ghclibdir}/${key}"\