diff options
author | Florian Pritz <bluewind@xinu.at> | 2014-02-04 19:16:16 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-05-27 15:46:04 +0200 |
commit | 00ee15e4de0d6adbe29b7f44b157ced8d1584b30 (patch) | |
tree | 19d810aba018f43a5abf8706b2277ba8766b85c0 | |
parent | 30f4f0b7648cc54754bd26aeb997c98bc97eda91 (diff) | |
download | dbscripts-00ee15e4de0d6adbe29b7f44b157ced8d1584b30.tar.gz dbscripts-00ee15e4de0d6adbe29b7f44b157ced8d1584b30.tar.xz |
add tag to get_file_from_pkgrepo
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | db-functions | 9 |
1 files 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 |