summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-29 02:55:19 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-29 02:55:19 -0700
commit142f30000454ac002334ebbecc3ad4010b64e796 (patch)
tree27bb9553809d46b7d68cc57a5727bcb520c2bce2
parent59ff620a2e6bd1239e501cbf171ec7655668fcb1 (diff)
downloadportage-142f30000454ac002334ebbecc3ad4010b64e796.tar.gz
portage-142f30000454ac002334ebbecc3ad4010b64e796.tar.bz2
portage-142f30000454ac002334ebbecc3ad4010b64e796.zip
dyn_spec: account for empty $FILESDIR
This should fix bug 342721.
-rwxr-xr-xbin/misc-functions.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index b266764f9..79ce43628 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -907,8 +907,10 @@ dyn_package() {
dyn_spec() {
local sources_dir=/usr/src/rpm/SOURCES
mkdir -p "${sources_dir}"
+ declare -a tar_args=("${EBUILD}")
+ [[ -d ${FILESDIR} ]] && tar_args=("${EBUILD}" "${FILESDIR}")
tar czf "${sources_dir}/${PF}.tar.gz" \
- "${EBUILD}" "${FILESDIR}" || \
+ "${tar_args[@]}" || \
die "Failed to create base rpm tarball."
cat <<__END1__ > ${PF}.spec