From: Zac Medico Date: Fri, 29 Oct 2010 09:55:19 +0000 (-0700) Subject: dyn_spec: account for empty $FILESDIR X-Git-Tag: v2.1.9.24~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ee53baefad8a0f9d1bdf3014d17730fc2d60002e;p=portage.git dyn_spec: account for empty $FILESDIR This should fix bug 342721. --- 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