Merge branch 'maint'

This commit is contained in:
Allan McRae 2013-05-29 14:02:56 +10:00
commit 84ac55b052
5 changed files with 35 additions and 36 deletions

6
NEWS
View File

@ -5,7 +5,7 @@ VERSION DESCRIPTION
- various translation fixes and updates (FS#34395, FS#34704,
FS#34716, FS#35097)
- makepkg:
- imporve SVN VCS PKGBUILD handling (FS#34675, FS#34636)
- improve SVN VCS PKGBUILD handling (FS#34675, FS#34636)
- allow "lp:" URLs for BZR sources (FS#34650)
- prevent pkgver() capturing stderr (FS#34974)
- fix attempt to remove package twice on failure (FS#34672)
@ -29,7 +29,7 @@ VERSION DESCRIPTION
(FS#28014)
- configure shell for running install scriptlets (FS#20557)
- make path to ldconfig configurable
- display repo in VerbosePkgLists output (FS#26334)
- display repo in VerbosePkgLists output
- do not check file conflicts or disk space with --dbonly
(FS#25667)
- UseDelta takes a ratio for the largest delta to use
@ -101,7 +101,7 @@ VERSION DESCRIPTION
- fix syntax error in remove_deps (FS#28448)
- small fixes related to multiple libdeps, parsing issues
- exit via default handler in trap_exit (FS#28491)
- attempt to work around BTRFS file/block size reporting issues
- attempt to work around Btrfs file/block size reporting issues
- pacman-key:
- remove signature verification in --populate
- make -e option work as advertised without arguments

View File

@ -32,7 +32,7 @@ fi
trap 'rm -f $CHECKUPDATE_DB/db.lck' INT TERM EXIT
DBPath="${DBPath:-@localstatedir@/lib/pacman/}"
eval $(awk -F' *= *' '$1 ~ /DBPath/ { print $1 "=" $2 }' /etc/pacman.conf)
eval $(awk -F' *= *' '$1 ~ /DBPath/ { print $1 "=" $2 }' @sysconfdir@/pacman.conf)
mkdir -p "$CHECKUPDATE_DB"
ln -s "${DBPath}/local" "$CHECKUPDATE_DB" &> /dev/null

View File

@ -109,8 +109,7 @@ runcmd() {
if sudo -v &>/dev/null && sudo -l &>/dev/null; then
sudo "$@"
else
printf '%s ' 'root'
su -c "$(printf '%q ' "$@")"
die 'Unable to escalate privileges using sudo'
fi
else
"$@"
@ -308,9 +307,9 @@ totalsaved=$(@SIZECMD@ "${candidates[@]}" | awk '{ sum += $1 } END { print sum }
# crush. kill. destroy.
(( verbose )) && cmdopts+=(-v)
if (( delete )); then
runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") rm "${cmdopts[@]}"
printf '%s\0' "${candidates[@]}" | runcmd xargs -0 rm "${cmdopts[@]}"
elif (( move )); then
runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") mv "${cmdopts[@]}" -t "$movedir"
printf '%s\0' "${candidates[@]}" | runcmd xargs -0 mv "${cmdopts[@]}" -t "$movedir"
fi
summarize "$pkgcount" "${candidates[@]}"

View File

@ -488,7 +488,7 @@ alpm_depend_t *_alpm_dep_dup(const alpm_depend_t *dep)
/* These parameters are messy. We check if this package, given a list of
* targets and a db is safe to remove. We do NOT remove it if it is in the
* target list, or if if the package was explicitly installed and
* target list, or if the package was explicitly installed and
* include_explicit == 0 */
static int can_remove_package(alpm_db_t *db, alpm_pkg_t *pkg,
alpm_list_t *targets, int include_explicit)

View File

@ -448,29 +448,14 @@ download_bzr() {
url=${url%%#*}
local repo=$(get_filename "$netfile")
local displaylocation="$url"
local revision=('-r-1')
if [[ -n $fragment ]]; then
case ${fragment%%=*} in
revision)
revision=("-r${fragment##*=}")
displaylocation="$url -r ${fragment##*=}"
;;
*)
error "$(gettext "Unrecognized reference: %s")" "${fragment}"
plain "$(gettext "Aborting...")"
exit 1
esac
fi
local dir=$(get_filepath "$netfile")
[[ -z "$dir" ]] && dir="$SRCDEST/$(get_filename "$netfile")"
if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then
msg2 "$(gettext "Branching %s ...")" "${displaylocation}"
if ! bzr branch "$url" "$dir" ${revision[@]} --no-tree --use-existing-dir; then
if ! bzr branch "$url" "$dir" --no-tree --use-existing-dir; then
error "$(gettext "Failure while branching %s")" "${displaylocation}"
plain "$(gettext "Aborting...")"
exit 1
@ -495,7 +480,7 @@ download_bzr() {
fi
msg2 "$(gettext "Pulling %s ...")" "${displaylocation}"
cd_safe "$dir"
if ! bzr pull "$url" ${revision[@]} --overwrite; then
if ! bzr pull "$url" --overwrite; then
# only warn on failure to allow offline builds
warning "$(gettext "Failure while pulling %s")" "${displaylocation}"
fi
@ -505,11 +490,25 @@ download_bzr() {
extract_bzr() {
local netfile=$1
local repo=$(get_filename "$netfile")
local fragment=${netfile#*#}
if [[ $fragment = "$netfile" ]]; then
unset fragment
fi
if [[ -n $fragment ]]; then
case ${fragment%%=*} in
revision)
revision=("-r" "${fragment#*=}")
displaylocation="$url -r ${fragment#*=}"
;;
*)
error "$(gettext "Unrecognized reference: %s")" "${fragment}"
plain "$(gettext "Aborting...")"
exit 1
esac
fi
local dir=$(get_filepath "$netfile")
[[ -z "$dir" ]] && dir="$SRCDEST/$(get_filename "$netfile")"
@ -517,7 +516,8 @@ extract_bzr() {
pushd "$srcdir" &>/dev/null
rm -rf "${dir##*/}"
if ! bzr checkout "$dir" --lightweight; then
if ! { bzr checkout "$dir" "${revision[@]}" --lightweight &&
( cd "$repo" && bzr pull "$dir" -q --overwrite "${revision[@]}" ); }; then
error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "bzr"
plain "$(gettext "Aborting...")"
exit 1
@ -1463,7 +1463,7 @@ run_function() {
fi
# ensure overridden package variables survive tee with split packages
logpipe=$(mktemp -u "$startdir/logpipe.XXXXXXXX")
logpipe=$(mktemp -u "$LOGDEST/logpipe.XXXXXXXX")
mkfifo "$logpipe"
tee "$BUILDLOG" < "$logpipe" &
local teepid=$!