From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7ED3A138222 for ; Thu, 5 May 2016 10:10:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D846821C0B9; Thu, 5 May 2016 10:10:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6506821C0B9 for ; Thu, 5 May 2016 10:10:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 08ACA34081F for ; Thu, 5 May 2016 10:10:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0F897335 for ; Thu, 5 May 2016 10:10:12 +0000 (UTC) From: "Jorge Manuel B. S. Vicetto" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jorge Manuel B. S. Vicetto" Message-ID: <1462442840.bac6e3a2d70d1c757f4ee3a51dcad1ef89cca922.jmbsvicetto@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: tools/ X-VCS-Repository: proj/releng X-VCS-Files: tools/catalyst-auto tools/catalyst-auto-amd64.conf X-VCS-Directories: tools/ X-VCS-Committer: jmbsvicetto X-VCS-Committer-Name: Jorge Manuel B. S. Vicetto X-VCS-Revision: bac6e3a2d70d1c757f4ee3a51dcad1ef89cca922 X-VCS-Branch: master Date: Thu, 5 May 2016 10:10:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: dae7a8cd-d28a-4d82-94c1-3d2913babad4 X-Archives-Hash: 1fc6a78ee8437d67d40189d0a493585c commit: bac6e3a2d70d1c757f4ee3a51dcad1ef89cca922 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) gentoo org> AuthorDate: Thu May 5 10:07:20 2016 +0000 Commit: Jorge Manuel B. S. Vicetto gentoo org> CommitDate: Thu May 5 10:07:20 2016 +0000 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=bac6e3a2 Move the code to update symlinks to a separate function, call it from pre_build and after each set build. Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) gentoo.org> tools/catalyst-auto | 10 +++++++++- tools/catalyst-auto-amd64.conf | 13 ++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/catalyst-auto b/tools/catalyst-auto index b928ac9..cc4da35 100755 --- a/tools/catalyst-auto +++ b/tools/catalyst-auto @@ -81,6 +81,13 @@ run_cmd() { fi } +update_symlinks() { + # This is a skeleton function that you can override from the config file. + # It will be called by pre_build and after completing the build of a set + # to ensure the symlinks point to the latest built stages. + local foo=bar +} + pre_build() { # This is a skeleton function that you can override from the config file. # It will be executed before the build is started. You can use this to @@ -246,7 +253,7 @@ for i in $(find -name '*.spec'); do sed -i 's|^snapshot:.*$|snapshot: '${DATESTAMP}'|' ${i} # We don't want to mangle the source_subpath for our stage1 spec - if ! grep -q '^target: *stage1$' ${i}; then + if ! [[grep -q '^target: *stage1$' ${i} || grep -q '^target: *stage4$' ${i} ]]; then sed -i 's|^source_subpath:.*$|source_subpath: '${new_source_subpath}'|' ${i} fi @@ -329,6 +336,7 @@ for a in "" ${SETS}; do run_cmd "time catalyst -P -c ${CATALYST_CONFIG} -f ${i}" "${LOGFILE}" done + update_symlinks done if ! run_cmd "post_build" "${TMPDIR}/log/post_build.log"; then diff --git a/tools/catalyst-auto-amd64.conf b/tools/catalyst-auto-amd64.conf index 48dd9cf..80bf8b7 100644 --- a/tools/catalyst-auto-amd64.conf +++ b/tools/catalyst-auto-amd64.conf @@ -59,11 +59,7 @@ give_latest_from_dates() { tr '~' '-' } -pre_build() { - pushd ${REPO_DIR} - git pull - popd - +update_symlinks() { # Symlink the latest stages3 to build from for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do pushd $d @@ -76,6 +72,13 @@ pre_build() { done } +pre_build() { + pushd ${REPO_DIR} + git pull + popd + update_symlinks +} + post_build() { pushd ${BUILD_SRCDIR_BASE}/default mkdir -p ${BUILD_DESTDIR_BASE}