@@ -79,8 +79,7 @@ for repo in "${PKGREPOS[@]}"; do
# Get the sources from svn
mkdir -p -m0770 "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}"
- arch_svn export -q "${SVNREPO}/${pkgbase}/repos/${repo}-${pkgarch}" \
- "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/${pkgbase}" >/dev/null 2>&1
+ export_from_vcs "${pkgbase}" "repos/${repo}-${pkgarch}" "" "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/${pkgbase}"
if (( $? >= 1 )); then
failedpkgs+=("${pkgbase}-${pkgver}${SRCEXT}")
continue
@@ -25,3 +25,18 @@ source_pkgbuild() {
. <(arch_svn cat "${SVNREPO}/${pkgbase}/${tag}/PKGBUILD" 2>/dev/null || echo "false")
}
+
+# Export PKGBUILD resource(s) from the package's git/svn/whatever repo.
+# Depending on how the VCS is used the tag might be "trunk" or "repos/$repo-$arch"
+# or the full package version (epoch:pkgver-pkgrel) or any other recognized tag.
+export_from_vcs() {
+ local pkgbase="$1"
+ local tag="$2"
+ local src="$3"
+ local dest="$4"
+
+ if [[ ! -e ${dest} ]]; then
+ mkdir -p "${dest%/?*}"
+ arch_svn export -q "${SVNREPO}/${pkgbase}/${tag}/${src}" "${dest}" 2>/dev/null
+ fi
+}
As of the source_pkgbuild rewrite, this is only ever done once. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> --- cron-jobs/sourceballs | 3 +-- db-functions-svn | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-)