Message ID | 2228068.y4thvyPt1K@portaka |
---|---|
State | Rejected |
Headers | show |
Dear Raúl Sánchez Siles, On Wed, 18 Sep 2013 07:11:43 +0200, Raúl Sánchez Siles wrote: > According to user manual "generic-package Reference" section, LIBFOO_VERSION > could refer to a branch or tag. This patch adds supports for this in the svn > method case for the repositories following the branches/tags/trunk layout. > > Examples: > LIBFOO_VERSION = tags/v3.2.1 > LIBFOO_SITE = svn://svn.server.net/myproject > > LIBFOO2_VERSION = branches/featureA > LIBFOO2_SITE = http://svn.happyserver.net/theproject > LIBFOO2_SITE_METHOD = svn > > Signed-off-by: Raúl Sánchez Siles <rasasi78@gmail.com> Hum, I am not sure. In the SVN world, a version is really a revision number that you get with 'svn checkout -r'. I believe to get a specific branch or tag with SVN, one should instead use: LIBFOO2_VERSION = <some revision number> LIBFOO2_SITE = http://svn.happyserver.net/theproject/branches/featureA I do understand the wish to make things 'like other VCS', but I am not entirely convinced it's a good idea. But I can probably be convinced with good arguments :) Thomas
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> Hum, I am not sure. In the SVN world, a version is really a
Thomas> revision number that you get with 'svn checkout -r'.
Thomas> I believe to get a specific branch or tag with SVN, one should
Thomas> instead use:
Thomas> LIBFOO2_VERSION = <some revision number>
Thomas> LIBFOO2_SITE = http://svn.happyserver.net/theproject/branches/featureA
Thomas> I do understand the wish to make things 'like other VCS', but I am not
Thomas> entirely convinced it's a good idea. But I can probably be convinced
Thomas> with good arguments :)
Yes, I would also prefer to keep it as it is.
Hi: Even that I understand Tom's answer as a NAK, I decided to send a revision of the previous patch, just for the record. In this version the last modified svn revision for the tag (or branch) is retrieved (and exactly that). Maybe someone can come with better and acceptable ideas from the buildroot point of view. I still consider the key point is being able to encode the revision into the $(PKG)_SOURCE variable. Regards, Raúl Sánchez Siles (1): Allow svn tags and branches notation in $(PKG)_VERSION variable. docs/manual/adding-packages-generic.txt | 2 ++ package/pkg-download.mk | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)
Sorry, I meant Peter. El Jueves, 19 de septiembre de 2013 23:58:55 usted escribió: > Hi: > > Even that I understand Tom's answer as a NAK, I decided to send a revision
Dear Raúl Sánchez Siles, On Thu, 19 Sep 2013 23:58:55 +0200, Raúl Sánchez Siles wrote: > I still consider the key point is being able to encode the revision into the > $(PKG)_SOURCE variable. I guess you meant "the key point is being able to encode the revision into the $(PKG)_VERSION" variable. But I don't see why this is important or useful, so could you explain why you believe it is necessary? For example, for Buildroot, doing: LIBFOO2_VERSION = branches/featureA LIBFOO2_SITE = http://svn.happyserver.net/theproject is not recommended at all, because you don't know which version of "featureA" you will be getting. One user may be fetching one revision, and if another user builds the same Buildroot configuration a few days later, it might be another revision with additional changes. That's why you should instead use: LIBFOO2_VERSION = <some revision number> LIBFOO2_SITE = http://svn.happyserver.net/theproject/branches/featureA What is the problem with doing this? Thanks! Thomas
diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt index cb067bd..df43e82 100644 --- a/docs/manual/adding-packages-generic.txt +++ b/docs/manual/adding-packages-generic.txt @@ -206,6 +206,8 @@ information is (assuming the package name is +libfoo+) : +LIBFOO_VERSION = 0.1.2+ + +LIBFOO_VERSION = cb9d6aa9429e838f0e54faa3d455bcbab5eef057+ + +LIBFOO_VERSION = stable+ + +LIBFOO_VERSION = tags/v3.2.1+ (svn method only) + +LIBFOO_VERSION = branches/featureA+ (svn method only) * +LIBFOO_SOURCE+ may contain the name of the tarball of the package. If +HOST_LIBFOO_SOURCE+ is not specified, it diff --git a/package/pkg-download.mk b/package/pkg-download.mk index 8e4a1ec..bc236ff 100644 --- a/package/pkg-download.mk +++ b/package/pkg-download.mk @@ -141,7 +141,9 @@ endef define DOWNLOAD_SVN test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ (pushd $(DL_DIR) > /dev/null && \ - $(SVN) export -r $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_DL_DIR) && \ + ($(SVN) info $($(PKG)_SITE)/$($(PKG)_DL_VERSION) > /dev/null && \ + $(SVN) export -r HEAD $($(PKG)_SITE)/$($(PKG)_DL_VERSION) $($(PKG)_DL_DIR) || \ + $(SVN) export -r $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_DL_DIR) ) && \ $(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \ rm -rf $($(PKG)_DL_DIR) && \ popd > /dev/null)
According to user manual "generic-package Reference" section, LIBFOO_VERSION could refer to a branch or tag. This patch adds supports for this in the svn method case for the repositories following the branches/tags/trunk layout. Examples: LIBFOO_VERSION = tags/v3.2.1 LIBFOO_SITE = svn://svn.server.net/myproject LIBFOO2_VERSION = branches/featureA LIBFOO2_SITE = http://svn.happyserver.net/theproject LIBFOO2_SITE_METHOD = svn Signed-off-by: Raúl Sánchez Siles <rasasi78@gmail.com> --- docs/manual/adding-packages-generic.txt | 2 ++ package/pkg-download.mk | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)