diff options
author | Allan McRae <allan@archlinux.org> | 2013-04-11 07:46:51 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-04-12 01:42:43 +0200 |
commit | 695f0e443e18ca5d7b722bdf2c4695cc63c1af54 (patch) | |
tree | 8d11f0a58167d63c35168f4da02e753b1d878307 /scripts | |
parent | 7e0f528274478e7d3057d71717596fdaa5e5bb79 (diff) | |
download | pacman-695f0e443e18ca5d7b722bdf2c4695cc63c1af54.tar.gz pacman-695f0e443e18ca5d7b722bdf2c4695cc63c1af54.tar.xz |
makepkg: fix svn repo extraction
Copy SVN repos rather than using "svn export" to keep all anotation
files in the repo for build scripts that use (e.g.) "svin info".
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/makepkg.sh.in | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 4d9176a2..dfc40772 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -743,7 +743,7 @@ extract_svn() { if [[ -n $fragment ]]; then case ${fragment%%=*} in revision) - ref=('-r' "${fragment##*=}") + ref="${fragment##*=}" ;; *) error "$(gettext "Unrecognized reference: %s")" "${fragment}" @@ -752,9 +752,14 @@ extract_svn() { esac fi - if ! svn export ${ref[@]} "$dir"; then - error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "svn" - plain "$(gettext "Aborting...")" + cp -a "$dir" . + + if [[ -n ${ref} ]]; then + cd_safe "$(get_filename "$netfile")" + if ! svn update -r ${ref}; then + error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "svn" + plain "$(gettext "Aborting...")" + fi fi popd &>/dev/null |