1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

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

View File

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