From 00ee15e4de0d6adbe29b7f44b157ced8d1584b30 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 4 Feb 2014 19:16:16 +0100 Subject: add tag to get_file_from_pkgrepo Signed-off-by: Florian Pritz --- db-functions | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/db-functions b/db-functions index 70c0ddf..ff3e1d7 100644 --- a/db-functions +++ b/db-functions @@ -477,7 +477,7 @@ check_pkgfile_pkgbuild() { if [ ! -f "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}/${_pkgbase}" ]; then mkdir -p "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}" - get_file_from_pkgrepo "$_pkgbase" PKGBUILD \ + get_file_from_pkgrepo "$_pkgbase" "$_pkgver" PKGBUILD \ > "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}/${_pkgbase}" [ $? -ge 1 ] && return 1 fi @@ -610,16 +610,19 @@ pkgentry_from_db() { return 1 } -# get_file_from_pkgrepo pkgbase filename +# get_file_from_pkgrepo pkgbase tag filename # # Get a file from the package's git/svn/whatever repo. +# tag is the full package version (epoch:pkgver-pkgrel) or depending on how +# the VCS is used any other recognized tag. # # Implementation note: This function should be the only one directly # interacting with the given VCS and should automatically detect # where a pkgbase is stored if multiple VCSs are used. get_file_from_pkgrepo() { local pkgbase="$1" - local filename="$2" + local tag="$2" + local filename="$3" # TODO: implement svn/git extraction curl -s https://projects.archlinux.org/svntogit/community.git/plain/trunk/$filename?h=packages/$pkgbase -- cgit v1.2.3-24-g4f1b