From a03a529513ba45552d7dc359baf464a85a25b1fb Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Sat, 10 Nov 2012 11:52:20 +0100 Subject: [PATCH] all plugins: do not load a library already loaded by another autospec module Signed-off-by: Davide Madrisan --- ChangeLog | 15 ++++++++++++++- lib/libapse.lib.in | 5 +++++ lib/libcfg.lib.in | 5 +++++ lib/libmsgmng.lib.in | 5 +++++ lib/libnetwork.lib.in | 5 +++++ lib/libspec.lib.in | 5 +++++ lib/libtest.lib.in | 5 +++++ 7 files changed, 44 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 197bea2..703e881 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Changes in version 1.14.2 + ++ bugfix + * plugins/* - Davide Madrisan: + Execute 'notify.disable_colors()' when 'colorize' is set to '0' (disabled) + to ignore color redefinitions made by user. + ++ improvement + * plugins/* - Davide Madrisan: + Do not load a library already loaded by another autospec module. + +------------------------------------------------------------------------------- + Changes in version 1.14.1 - _TO*Hacklab release Fri Nov 09 2012 Davide Madrisan @@ -18,7 +31,7 @@ Fri Nov 09 2012 Davide Madrisan Updated. + bugfix - * plugins/pck-update.in - Silvan Calarco: + * plugins/pck-update - Silvan Calarco: Restore build requirement detection for *.so requirements + improvement diff --git a/lib/libapse.lib.in b/lib/libapse.lib.in index f611294..1806b52 100644 --- a/lib/libapse.lib.in +++ b/lib/libapse.lib.in @@ -3,6 +3,9 @@ # Copyright (C) 2007,2012 Stefano Cotta Ramusino # Copyright (C) 2008-2011 Silvan Calarco +[ "$libapse_is_loaded" = 1 ] || { +libapse_is_loaded=1 + [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] && echo $"this script requires bash version 2 or better" >&2 && exit 1 @@ -590,3 +593,5 @@ a newer version of \`${NOTE}$specname${NORM}' is already installed" return $retval } + +} # endif $libapse_is_loaded diff --git a/lib/libcfg.lib.in b/lib/libcfg.lib.in index 79a03be..8f2bdaf 100644 --- a/lib/libcfg.lib.in +++ b/lib/libcfg.lib.in @@ -2,6 +2,9 @@ # libcfg.lib -- @package@ library for loading the configuration file(s) # Copyright (C) 2008,2011,2012 Davide Madrisan +[ "$libcfg_is_loaded" = 1 ] || { +libcfg_is_loaded=1 + [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] && echo $"this script requires bash version 2 or better" >&2 && exit 1 @@ -122,3 +125,5 @@ done [ "$cfg_files_num" = 0 ] && notify.error $"configuration file not found" unset cfg_file + +} # endif $libcfg_is_loaded diff --git a/lib/libmsgmng.lib.in b/lib/libmsgmng.lib.in index 47c7974..40a61bb 100644 --- a/lib/libmsgmng.lib.in +++ b/lib/libmsgmng.lib.in @@ -2,6 +2,9 @@ # libmsgmng.lib -- @package@ library to manage debug/warning/error messages # Copyright (C) 2005,2006,2008,2012 Davide Madrisan +[ "$libmsgmng_is_loaded" = 1 ] || { +libmsgmng_is_loaded=1 + [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] && echo $"this script requires bash version 2 or better" >&2 && exit 1 @@ -69,3 +72,5 @@ function notify.note() { [ ${verbose:-0} -ge 0 ] || return echo -e "${1:-$notify_def_msg}" } + +} # endif $libmsgmng_is_loaded diff --git a/lib/libnetwork.lib.in b/lib/libnetwork.lib.in index eddb093..c5983b1 100644 --- a/lib/libnetwork.lib.in +++ b/lib/libnetwork.lib.in @@ -2,6 +2,9 @@ # libnetwork.lib -- @package@ library to get info from internet repositories # Copyright (C) 2008,2010,2012 Davide Madrisan +[ "$libnetwork_is_loaded" = 1 ] || { +libnetwork_is_loaded=1 + [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] && { echo $"this script requires bash version 3 or better" >&2 && exit 1; } @@ -1062,3 +1065,5 @@ an error occurred while creating"": ${pck_tarball}.tar.bz2" return 0 } + +} # endif $libnetwork_is_loaded diff --git a/lib/libspec.lib.in b/lib/libspec.lib.in index 365bd42..8bd31a9 100644 --- a/lib/libspec.lib.in +++ b/lib/libspec.lib.in @@ -2,6 +2,9 @@ # libspec.lib -- @package@ library to manage rpm specfiles # Copyright (C) 2004-2010,2012 Davide Madrisan +[ "$libspec_is_loaded" = 1 ] || { +libspec_is_loaded=1 + [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] && echo $"this script requires bash version 2 or better" >&2 && exit 1 @@ -1244,3 +1247,5 @@ function getversionfromtarball() { notify.debug "$FUNCNAME: pck_version = \"$pck_version\"" echo "$pck_version" } + +} # endif $libspec_is_loaded diff --git a/lib/libtest.lib.in b/lib/libtest.lib.in index befaeec..13e2cb0 100644 --- a/lib/libtest.lib.in +++ b/lib/libtest.lib.in @@ -2,6 +2,9 @@ # libtest.lib -- @package@ library used by the test framework # Copyright (C) 2012 Davide Madrisan +[ "$libtest_is_loaded" = 1 ] || { +libtest_is_loaded=1 + [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] && { echo $"this script requires bash version 3 or better" >&2 && exit 1; } @@ -170,3 +173,5 @@ function test.runall() { --tmpdir "$tmpextractdir" done } + +} # endif $libtest_is_loaded