1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

makepkg: do not retrieve sources if NOEXTRACT or REPKG set

Signed-off-by: Dag Odenhall <dag.odenhall@gmail.com>
Signed-off-by: Andrew Fyfe <Andrew Fyfe  andrew@neptune-one.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dag Odenhall 2007-05-30 23:04:36 +02:00 committed by Dan McGee
parent 90a307bfa3
commit 2ef1c8416f

View File

@ -997,43 +997,47 @@ cd "$startdir"
mkdir -p src mkdir -p src
cd "$srcdir" cd "$srcdir"
msg "$(gettext "Retrieving Sources...")" if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
for netfile in ${source[@]}; do warning "$(gettext "Skipping source retrieval -- using existing src/ tree")"
file=$(strip_url "$netfile") else
if [ -f "../$file" ]; then msg "$(gettext "Retrieving Sources...")"
msg2 "$(gettext "Found %s in build dir")" "$file" for netfile in ${source[@]}; do
cp "../$file" . file=$(strip_url "$netfile")
continue if [ -f "../$file" ]; then
elif [ -f "$SRCDEST/$file" ]; then msg2 "$(gettext "Found %s in build dir")" "$file"
msg2 "$(gettext "Using cached copy of %s")" "$file" cp "../$file" .
cp "$SRCDEST/$file" . continue
continue elif [ -f "$SRCDEST/$file" ]; then
fi msg2 "$(gettext "Using cached copy of %s")" "$file"
cp "$SRCDEST/$file" .
continue
fi
# find the client we should use for this URL # find the client we should use for this URL
dlclient=$(getdownloadclient $netfile) || exit $? dlclient=$(getdownloadclient $netfile) || exit $?
msg2 "$(gettext "Downloading %s")" "$file" msg2 "$(gettext "Downloading %s")" "$file"
# fix flyspray bug #3289 # fix flyspray bug #3289
ret=0 ret=0
$dlclient "$netfile" || ret=$? $dlclient "$netfile" || ret=$?
if [ $ret -gt 0 ]; then
error "$(gettext "Failure while downloading %s")" "$file"
msg "$(gettext "Aborting...")"
exit 1
fi
if [ -n "$SRCDEST" ]; then
mkdir -p "$SRCDEST" && cp "$file" "$SRCDEST" || ret=$?
if [ $ret -gt 0 ]; then if [ $ret -gt 0 ]; then
warning "$(gettext "You do not have correct permissions to cache source in %s")" "$SRCDEST" error "$(gettext "Failure while downloading %s")" "$file"
msg "$(gettext "Aborting...")"
exit 1
fi
if [ -n "$SRCDEST" ]; then
mkdir -p "$SRCDEST" && cp "$file" "$SRCDEST" || ret=$?
if [ $ret -gt 0 ]; then
warning "$(gettext "You do not have correct permissions to cache source in %s")" "$SRCDEST"
cp "$file" ..
fi
else
cp "$file" .. cp "$file" ..
fi fi
else done
cp "$file" .. unset netfile file dlclient ret
fi fi
done
unset netfile file dlclient ret
if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
warning "$(gettext "Skipping source integrity checks -- using existing src/ tree")" warning "$(gettext "Skipping source integrity checks -- using existing src/ tree")"