From f0108632cddad9e975d6e82c462600bd2d454e2c Mon Sep 17 00:00:00 2001 From: DT Netsolution GmbH Date: Mon, 6 Feb 2012 19:13:57 +0100 Subject: [PATCH] - Improvement: Purging product version only related to a defined OPSI_REPOS_PURGE_STATUS - New: Add template for testing products --- conf/opsi-builder.cfg | 5 +++++ lib/builder-targets.sh | 10 +++++++--- sample/Testing.txt | 28 ++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 sample/Testing.txt diff --git a/conf/opsi-builder.cfg b/conf/opsi-builder.cfg index bda97bd..4e64374 100644 --- a/conf/opsi-builder.cfg +++ b/conf/opsi-builder.cfg @@ -84,6 +84,11 @@ OPSI_REPOS_OPSIMANAGER_INSTALL=false # Valid values: true|false OPSI_REPOS_PURGE=false +# Only purge projects using the defined STATUS +# ValidValues: integration|testing|release +# Defaut: integration +OPSI_REPOS_PURGE_STATUS=integration + # defines the max. instances of published versions per product # Valid values: 0...n, 0: disable autocleanup OPSI_REPOS_PURGE_LIMIT=3 diff --git a/lib/builder-targets.sh b/lib/builder-targets.sh index 4b0e04e..295d10e 100644 --- a/lib/builder-targets.sh +++ b/lib/builder-targets.sh @@ -303,17 +303,20 @@ builder_publish() { # Create revision file for this local rev_file=${OPSI_REPOS_PRODUCT_DIR}/${PN}-${VERSION}-${CREATOR_TAG}${RELEASE}.cfg cat > $rev_file < 0 ] ; then + if [ "${OPSI_REPOS_PURGE}" = "true" ] && [ ! -z "${OPSI_REPOS_PURGE_LIMIT}" ] && [ "${OPSI_REPOS_PURGE_LIMIT}" > 0 ] && [ "${STATUS}" = "${OPSI_REPOS_PURGE_STATUS}" ] ; then echo "Autopurging enabled" # determinte max version to delete @@ -339,9 +342,10 @@ EOF for cfg_sort_file in `tail -${limit} ${file_sort_list} | ${CMD_comm} -13 - ${file_sort_list}` ; do local cfg_file=`echo $cfg_sort_file | cut -f 2 -d ";"` - dir_base=`dirname ${cfg_file}` . ${cfg_file} + if [ "${REV_STATUS}" != "${OPSI_REPOS_PURGE_STATUS}" ] ; then continue; fi + dir_base=`dirname ${cfg_file}` product_file="${dir_base}/${REV_OPSI_REPOS_FILE_PATTERN}" echo " Purging product version: $product_file.*" diff --git a/sample/Testing.txt b/sample/Testing.txt new file mode 100644 index 0000000..d6b5e6c --- /dev/null +++ b/sample/Testing.txt @@ -0,0 +1,28 @@ +*** Qualitiymanagement/Testing procedure + +- Product: + - Name: productname + - Version: xxx + - Release: yyyy + +- Environment + - OS: Native windows XP-32Bit installation + - Preinstalled packages: None (also no aio) + - Files used while testing: + File1: http://domain.de/file.ext + +- Testing process: + OPSI-action: + - Installation (without dependencies like AIO/Firefox): ?? + Result: + - File extensions related to program: ?? + - Start menu entry: ?? + - Starting/using program: viewer works, File1 is shown correctly: ?? + + OPSI-action: + - Uninstall + Result: + - File extensions related to program: unrelated: ?? + - Start menu entry: none: ?? + +