spec-create: Honour the pck version set by the user for specs generated from git
specfile.create(): always execute 'git.create_tarball()' with the option '--pck-version'. This way a user-provided package version will be used instead of the default one. This patch will permit to force a user defined package version when desired. Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
0ae1946627
commit
26856b5b71
@ -41,6 +41,15 @@ Fri Aug 15 2014 Madrisan <davide.madrisan(a)gmail.com>
|
|||||||
that do not provide any 'configure' script but only an 'autogen,sh' one.
|
that do not provide any 'configure' script but only an 'autogen,sh' one.
|
||||||
Feature asked by Silvan Calarco.
|
Feature asked by Silvan Calarco.
|
||||||
|
|
||||||
|
* spec-create - Davide Madrisan
|
||||||
|
specfile.create(): always execute 'git.create_tarball()' with the option
|
||||||
|
'--pck-version'. This way a user-provided package version will be used
|
||||||
|
instead of the default one.
|
||||||
|
Feature asked by Silvan Calarco.
|
||||||
|
|
||||||
|
* lib/libnetwork.lib - Davide Madrisan
|
||||||
|
git.download(): document and honour the '--pck-version' when set.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.16.4 - "Korbielow" release
|
Changes in version 1.16.4 - "Korbielow" release
|
||||||
|
5
NEWS
5
NEWS
@ -14,6 +14,11 @@ List of user visible changes in the release 1.16.5
|
|||||||
that do not provide any 'configure' script but only an 'autogen,sh' one.
|
that do not provide any 'configure' script but only an 'autogen,sh' one.
|
||||||
Feature asked by Silvan Calarco.
|
Feature asked by Silvan Calarco.
|
||||||
|
|
||||||
|
* spec-create - Davide Madrisan
|
||||||
|
Honour the package version set by the user at command line when generating
|
||||||
|
a specfile from a git repository.
|
||||||
|
Feature asked by Silvan Calarco.
|
||||||
|
|
||||||
-- Bugfix
|
-- Bugfix
|
||||||
|
|
||||||
* templates/python - Silvan Calarco
|
* templates/python - Silvan Calarco
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# libnetwork.lib -- @package@ library to get info from internet repositories
|
# libnetwork.lib -- @package@ library to get info from internet repositories
|
||||||
# Copyright (C) 2008,2010,2012 Davide Madrisan <davide.madrisan@gmail.com>
|
# Copyright (C) 2008,2010,2012,2014 Davide Madrisan <davide.madrisan@gmail.com>
|
||||||
|
|
||||||
[ "$libnetwork_is_loaded" = 1 ] || {
|
[ "$libnetwork_is_loaded" = 1 ] || {
|
||||||
libnetwork_is_loaded=1
|
libnetwork_is_loaded=1
|
||||||
@ -924,6 +924,7 @@ function git.download() {
|
|||||||
#
|
#
|
||||||
# args:
|
# args:
|
||||||
# -d,--destdir : target directory
|
# -d,--destdir : target directory
|
||||||
|
# -v,--pck-version : package version
|
||||||
# --git-branch : git branch
|
# --git-branch : git branch
|
||||||
# --preserve-dot-git : do not remove .git files
|
# --preserve-dot-git : do not remove .git files
|
||||||
# $@ : git repository
|
# $@ : git repository
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pck-create -- plugin for @package@
|
# pck-create -- plugin for @package@
|
||||||
# Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com>
|
# Copyright (C) 2004-2014 Davide Madrisan <davide.madrisan@gmail.com>
|
||||||
|
|
||||||
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
|
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
|
||||||
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
|
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
|
||||||
@ -512,13 +512,14 @@ s,@spec_changelog_comment@,$spec_changelog_comment,
|
|||||||
# specfile.create()
|
# specfile.create()
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $1 : try to create a specfile from this tarball
|
# $1 : try to create a specfile from this tarball
|
||||||
# $2 : package name
|
# $2 : source (with or without path; can be a remote url)
|
||||||
# $3 : package version
|
# $3 : package name
|
||||||
# $4 : package tipology (template)
|
# $4 : package version
|
||||||
# $5 : output file
|
# $5 : output file
|
||||||
# Description:
|
# Description:
|
||||||
# Create an initial specfile to help packaging activities
|
# Create an initial specfile to help packaging activities
|
||||||
#
|
#
|
||||||
|
|
||||||
function specfile.create() {
|
function specfile.create() {
|
||||||
notify.debug "[ ${0}${exec_options} ]\n"
|
notify.debug "[ ${0}${exec_options} ]\n"
|
||||||
|
|
||||||
@ -537,11 +538,13 @@ function specfile.create() {
|
|||||||
|
|
||||||
# 'pck_tarball' = absolute path of '$1'
|
# 'pck_tarball' = absolute path of '$1'
|
||||||
local pck_tarball
|
local pck_tarball
|
||||||
local pck_name pck_version
|
local pck_name
|
||||||
|
local pck_version="$4"
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
git://*|http://*.git|https://*.git)
|
git://*|http://*.git|https://*.git)
|
||||||
git.create_tarball \
|
git.create_tarball \
|
||||||
|
--pck-version="$pck_version" \
|
||||||
--git-branch="$git_branch" \
|
--git-branch="$git_branch" \
|
||||||
--preserve-dot-git="$preserve_dot_git" \
|
--preserve-dot-git="$preserve_dot_git" \
|
||||||
--destdir="$source_dir" "$2"
|
--destdir="$source_dir" "$2"
|
||||||
|
Loading…
Reference in New Issue
Block a user