From 6549a7abbd84791261b40f66726eb027a45df59b Mon Sep 17 00:00:00 2001 From: Alec Leamas <leamas.alec@gmail.com> Date: Mon, 27 Jan 2014 18:55:34 +0100 Subject: [PATCH 3/3] pkgbuild: Bugfix: respect CONFIG (bz 1057878). --- TESTING | 2 ++ scripts/lpf-defs.bash | 1 + scripts/lpf-pkgbuild | 3 +++ 3 files changed, 6 insertions(+) diff --git a/TESTING b/TESTING index 740e82b..cce98e8 100644 --- a/TESTING +++ b/TESTING @@ -38,6 +38,8 @@ There are some automated tests and some manual. To run them all: - Check that repeated GUI update displays correct "Nothing to update" message. +- Rebuild lpf-skype on a 64-bit host. + Running in mock: $ mock -r fedora-19-i386 --init $ mock -r fedora-19-i386 --install ~/dist/lpf-*.noarch.rpm diff --git a/scripts/lpf-defs.bash b/scripts/lpf-defs.bash index b53b1ca..c838d2e 100644 --- a/scripts/lpf-defs.bash +++ b/scripts/lpf-defs.bash @@ -23,6 +23,7 @@ function get_approve_file() { echo $LPF_VAR/approvals/$1; } function get_resultdir() { echo $LPF_VAR/rpms/$1; } function get_notifydir() { echo $LPF_VAR/notify/$1; } function get_pkg_srcdir() { echo $LPF_DATA/packages/$1/SOURCES; } +function get_pkg_datadir() { echo $LPF_DATA/packages/$1; } function get_eula_dir() { echo $LPF_DATA/packages/$1/eula; } function get_spec() { echo $LPF_DATA/packages/$1/$1.spec; } function _get_statefile() { echo $LPF_VAR/packages/$1/state; } diff --git a/scripts/lpf-pkgbuild b/scripts/lpf-pkgbuild index 5d1b83d..136ebde 100755 --- a/scripts/lpf-pkgbuild +++ b/scripts/lpf-pkgbuild @@ -43,12 +43,15 @@ function build_pkg() local pkg="$1" local spec=$( get_spec $pkg ) local buildlog=$( get_logfile $pkg ) + local pkgdir=$( get_pkg_datadir $pkg ) rm -rf $rpm_rpmdir/* &> /dev/null rm -rf $rpm_srcdir/* &> /dev/null [ -w "$rpm_srcdir" ] || rpmdev-setuptree exec 5<&1 6<&2 # Preserve stdout/stderr. exec &>> $buildlog + source $scriptdir/../CONFIG + [ -f $pkgdir/CONFIG ] && source $pkgdir/CONFIG cd $rpm_srcdir cp $( get_pkg_srcdir $pkg )/* $PWD &>/dev/null || : echo "$pkg: downloading sources" >&5 && spectool -g $spec && -- 1.8.4.2