makepkg: simplify source archive generation

Simplify the source tarball generation by unifying the handling of
local and remote files.  This also allows local files to be found
in $SRCDEST (FS#26580) and makepkg will abort on missing local source
files (only possible to trigger in combination with --skipinteg).

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2012-01-08 21:48:04 +10:00 committed by Dan McGee
parent 102e6209c7
commit 36413aa856
1 changed files with 3 additions and 5 deletions

View File

@ -1334,11 +1334,9 @@ create_srcpackage() {
local file
for file in "${source[@]}"; do
if [[ -f $file ]]; then
msg2 "$(gettext "Adding %s...")" "$file"
ln -s "${startdir}/$file" "$srclinks/$pkgbase"
elif (( SOURCEONLY == 2 )); then
local absfile=$(get_filepath "$file") || missing_source_file "$file"
if [[ "$file" == $(get_filename "$file") ]] || (( SOURCEONLY == 2 )); then
local absfile
absfile=$(get_filepath "$file") || missing_source_file "$file"
msg2 "$(gettext "Adding %s...")" "${absfile##*/}"
ln -s "$absfile" "$srclinks/$pkgbase"
fi