From 3425fbf7eed67a7659a435a073ccee3003d33110 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Wed, 31 Oct 2012 22:01:49 +0100 Subject: [PATCH] libnetwork.lib: git.create_tarball(): add a warning message when the version passed to the function is not the expected one (that is a string made by the current date in the format YYYYMMDD followed by 'git') Signed-off-by: Davide Madrisan --- ChangeLog | 5 +++++ lib/libnetwork.lib.in | 12 +++++++++--- po/it/libnetwork.po | 3 +++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cfc0b2e..eb0f17a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -64,6 +64,11 @@ Changes in version 1.12.6 * pck-update - Davide Madrisan: Action 3,5: set the package version when calling 'git.download()'. + * lib/libnetwork.lib - Davide Madrisan: + git.create_tarball(): add a warning message when the version passed to the + function is not the expected one (that is a string made by the current + date in the format YYYYMMDD followed by "git"). + ------------------------------------------------------------------------------- Changes in version 1.12.5 diff --git a/lib/libnetwork.lib.in b/lib/libnetwork.lib.in index d5562c4..9fce90f 100644 --- a/lib/libnetwork.lib.in +++ b/lib/libnetwork.lib.in @@ -987,9 +987,15 @@ function git.create_tarball() { [ "$destdir" ] || notify.error $"\ (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)" - [ "$pck_version" ] || - { pck_version="$(date "+%Y%m%dgit")" - notify.debug "$FUNCNAME: pck_version = \"$pck_version\""; } + local today="$(date "+%Y%m%d")" + if [ "$pck_version" ]; then + [ "$pck_version" = "${today}git" ] || notify.warning "\ +${NOTE}${today}git${NORM}: "$"\ +not the expected package version"" (${NOTE}${today}git${NORM})..." + else + pck_version="${today}git" + notify.debug "$FUNCNAME: pck_version = \"$pck_version\"" + fi which git &>/dev/null || notify.error $"utility not found"": \`git'" diff --git a/po/it/libnetwork.po b/po/it/libnetwork.po index 10e616a..9e31e76 100644 --- a/po/it/libnetwork.po +++ b/po/it/libnetwork.po @@ -88,6 +88,9 @@ msgstr "pacchetto non trovato" msgid "downloading" msgstr "download di" +msgid "not the expected package version" +msgstr "non รจ la versione di pacchetto prevista" + msgid "cloning git repository" msgstr "clonazione del repository"