Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   makepkg: simplify source archive generation (http://www.linux-archive.org/archlinux-pacman-development/618587-makepkg-simplify-source-archive-generation.html)

Allan McRae 01-08-2012 10:52 AM

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>
---
scripts/makepkg.sh.in | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 769bec7..b06c78a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1348,11 +1348,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
--
1.7.8.1


All times are GMT. The time now is 11:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.