Commit 4fad1259 authored by Joao Mano's avatar Joao Mano Committed by Thomas Petazzoni
Browse files

support/download: alternative access methods to CVS



Allows user to specify other access methods than :pserver:anonymous@
on CVS repositories. This shall be defined in the <pkg>_SITE variable.

[Thomas:
 - as suggested by Yann, quote the variable expansion
 - as suggested by Yann, use a regexp match
 - tweak commit log]

Signed-off-by: default avatarJoao Mano <joao@datacom.ind.br>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 544e2c58
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -279,7 +279,12 @@ information is (assuming the package name is +libfoo+) :
  ** +cvs+ for retrieving source code from a CVS repository.
     Used by default when +LIBFOO_SITE+ begins with +cvs://+.
     The downloaded source code is cached as with the +svn+ method.
     Only anonymous pserver mode is supported.
     Anonymous pserver mode is assumed otherwise explicitly defined
     on +LIBFOO_SITE+. Both
     +LIBFOO_SITE=cvs://libfoo.net:/cvsroot/libfoo+ and
     +LIBFOO_SITE=cvs://:ext:libfoo.net:/cvsroot/libfoo+
     are accepted, on the former anonymous pserver access mode is
     assumed.
     +LIBFOO_SITE+ 'must' contain the source URL as well as the remote
     repository directory. The module is the package name.
     +LIBFOO_VERSION+ is 'mandatory' and 'must' be a tag, a branch, or
+7 −1
Original line number Diff line number Diff line
@@ -40,8 +40,14 @@ else
    select="-r"
fi

# The absence of an initial : on ${repo} means access method undefined
if [[ ! "${repo}" =~ ^: ]]; then
   # defaults to anonymous pserver
   repo=":pserver:anonymous@${repo}"
fi

export TZ=UTC
_cvs ${verbose} -z3 -d"':pserver:anonymous@${repo}'" \
_cvs ${verbose} -z3 -d"'${repo}'" \
     co -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'"

tar czf "${output}" "${basename}"