Support released versions from Git branches

* Do not assume a release has a tarball if src_release is set to "n".
 * Do not assume versions in repositories are all experimental.
 * Allow versions to define their default repository_branch,
   repository_cset, repository_subdir and bootstrap.
 * Do not expect mirrors, archive_filename, archive_dirname,
   archive_formats and signature_format from a version if src_release
   is set to "n".
 * Add version_number to allow version names to be different than the
   version number. When given, use version_number to compare against
   the milestones.

Signed-off-by: Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
This commit is contained in:
Egeyar 2019-05-27 13:17:33 +00:00 committed by Chris Packham
parent ed3a1ff4b9
commit 7fdb7665f7
2 changed files with 22 additions and 6 deletions

View File

@ -574,6 +574,9 @@ enter_fork()
info[pkg_name]=${fork} info[pkg_name]=${fork}
info[pkg_label]=${fork} info[pkg_label]=${fork}
info[mirrors]= info[mirrors]=
info[src_release]=
info[src_devel]=
info[src_custom]=
info[archive_filename]='@{pkg_name}-@{version}' info[archive_filename]='@{pkg_name}-@{version}'
info[archive_dirname]='@{pkg_name}-@{version}' info[archive_dirname]='@{pkg_name}-@{version}'
info[versionlocked]= info[versionlocked]=
@ -646,7 +649,11 @@ enter_milestone()
info[ms]=${ms} info[ms]=${ms}
if [ -n "${info[ver]}" ]; then if [ -n "${info[ver]}" ]; then
info[version_cmp_milestone]=`cmp_versions ${info[ver]} ${info[ms]}` if [ -n "${info[version_number]}" ]; then
info[version_cmp_milestone]=`cmp_versions ${info[version_number]} ${info[ms]}`
else
info[version_cmp_milestone]=`cmp_versions ${info[ver]} ${info[ms]}`
fi
fi fi
} }

View File

@ -53,7 +53,7 @@ config @@fork|@@_PKG_NAME
choice choice
bool "Source of @@pkg_label@@" bool "Source of @@pkg_label@@"
#!if [ "@@#version@@" -gt 0 ] #!if [ "@@#version@@" -gt 0 ] && [ "@@src_release@@" != "n" ]
config @@fork|@@_SRC_RELEASE config @@fork|@@_SRC_RELEASE
bool "Released tarball" bool "Released tarball"
help help
@ -62,9 +62,6 @@ config @@fork|@@_SRC_RELEASE
#!end-if #!end-if
config @@fork|@@_SRC_DEVEL config @@fork|@@_SRC_DEVEL
bool "Vendor/custom repository" bool "Vendor/custom repository"
#!if [ "@@#version@@" -gt 0 ]
depends on EXPERIMENTAL
#!end-if
help help
Check out from a repository. Check out from a repository.
#!if [ -n "@@repository@@" ] #!if [ -n "@@repository@@" ]
@ -116,6 +113,9 @@ config @@fork|@@_DEVEL_URL
config @@fork|@@_DEVEL_BRANCH config @@fork|@@_DEVEL_BRANCH
string "Branch/tag to check out" string "Branch/tag to check out"
#!foreach version if-differs repository_branch
default "@@repository_branch@@" if @@fork|@@_V_@@ver_sel|@@
#!end-foreach
default "@@repository_branch@@" default "@@repository_branch@@"
help help
Git/CVS: branch/tag to be checked out Git/CVS: branch/tag to be checked out
@ -126,6 +126,9 @@ config @@fork|@@_DEVEL_BRANCH
config @@fork|@@_DEVEL_REVISION config @@fork|@@_DEVEL_REVISION
string "Revision/changeset" string "Revision/changeset"
#!foreach version if-differs repository_cset
default "@@repository_cset@@" if @@fork|@@_V_@@ver_sel|@@
#!end-foreach
default "@@repository_cset@@" default "@@repository_cset@@"
help help
Commit ID or revision ID to check out. Commit ID or revision ID to check out.
@ -135,6 +138,9 @@ config @@fork|@@_DEVEL_REVISION
config @@fork|@@_DEVEL_SUBDIR config @@fork|@@_DEVEL_SUBDIR
string "Subdirectory in the repository" string "Subdirectory in the repository"
#!foreach version if-differs repository_subdir
default "@@repository_subdir@@" if @@fork|@@_V_@@ver_sel|@@
#!end-foreach
default "@@repository_subdir@@" default "@@repository_subdir@@"
help help
Some projects produce releases not from the top-level directory in the Some projects produce releases not from the top-level directory in the
@ -143,6 +149,9 @@ config @@fork|@@_DEVEL_SUBDIR
config @@fork|@@_DEVEL_BOOTSTRAP config @@fork|@@_DEVEL_BOOTSTRAP
string "Bootstrap command" string "Bootstrap command"
#!foreach version if-differs bootstrap
default "@@bootstrap@@" if @@fork|@@_V_@@ver_sel|@@
#!end-foreach
default "@@bootstrap@@" default "@@bootstrap@@"
help help
Command to run after checking out. Some projects don't store the generated Command to run after checking out. Some projects don't store the generated
@ -316,7 +325,7 @@ config @@fork|@@_VERSION
default "old" if @@fork|@@_VERY_OLD default "old" if @@fork|@@_VERY_OLD
default "unknown" default "unknown"
#!if [ "@@#version@@" -gt 0 ] #!if [ "@@#version@@" -gt 0 ] && [ "@@src_release@@" != "n" ]
config @@fork|@@_MIRRORS config @@fork|@@_MIRRORS
string string
#!foreach version if-differs mirrors #!foreach version if-differs mirrors