From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 124F3138334 for ; Wed, 9 Jan 2019 17:19:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E29DAE0B67; Wed, 9 Jan 2019 17:19:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BCF99E0B67 for ; Wed, 9 Jan 2019 17:19:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7FC3F335CFF for ; Wed, 9 Jan 2019 17:19:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7D654459 for ; Wed, 9 Jan 2019 17:19:29 +0000 (UTC) From: "Ben Kohler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ben Kohler" Message-ID: <1547054328.d8a805cba3ea8cc800fdc0e6e9a4972f933701c2.bkohler@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: tools/ X-VCS-Repository: proj/releng X-VCS-Files: tools/catalyst-auto-sparc64.conf X-VCS-Directories: tools/ X-VCS-Committer: bkohler X-VCS-Committer-Name: Ben Kohler X-VCS-Revision: d8a805cba3ea8cc800fdc0e6e9a4972f933701c2 X-VCS-Branch: master Date: Wed, 9 Jan 2019 17:19:29 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4c733577-db7e-4346-b428-ead0c84972ee X-Archives-Hash: 8a86657e7ac84626ffe65bd5eee81441 commit: d8a805cba3ea8cc800fdc0e6e9a4972f933701c2 Author: Ben Kohler gentoo org> AuthorDate: Wed Jan 9 17:18:48 2019 +0000 Commit: Ben Kohler gentoo org> CommitDate: Wed Jan 9 17:18:48 2019 +0000 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=d8a805cb lyst-auto-sparc64.conf: borrow new symlink logic from amd64 Signed-off-by: Ben Kohler gentoo.org> tools/catalyst-auto-sparc64.conf | 43 +++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/tools/catalyst-auto-sparc64.conf b/tools/catalyst-auto-sparc64.conf index 5f37ecd2..f6357a35 100644 --- a/tools/catalyst-auto-sparc64.conf +++ b/tools/catalyst-auto-sparc64.conf @@ -23,27 +23,34 @@ KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/sparc EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]" give_latest_from_dates() { - sed 's,-20,~20,g' | \ - sort -k +1 -n -t '~' |\ - awk -F\~ \ - 'BEGIN{i=$1; o=$0}; - { if($1 != i && i != "") { print o; }; i=$1; o=$0; } - END { print o; };' | \ - tr '~' '-' + sed 's,-20,~20,g' | \ + sort -k +1 -n -t '~' | \ + awk -F\~ \ + 'BEGIN{i=$1; o=$0}; + { if($1 != i && i != "") { print o; }; i=$1; o=$0; } + END { print o; };' | \ + tr '~' '-' } - update_symlinks() { - # Symlink the latest stages3 to build from - for d in ${BUILD_SRCDIR_BASE}/default; do - pushd $d >/dev/null - for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do - of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff - of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $ - ln -sf $f $of - done - popd >/dev/null - done + # Symlink the latest stages3 to build from + for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do + pushd $d >/dev/null + for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do + # 20yymmddThhmmssZ + # 20yymmddhhmmss + # 20yymmdd + # 20yy.n + of=$(perl -p \ + -e 's/20\d{6}T\d{6}Z/latest/g;' \ + -e 's/20\d{6}\d{6}/latest/g;' \ + -e 's/20\d{6}/latest/g;' \ + -e 's/20\d{2}\.\d{2}/latest/g;' \ + <<<"$f") + ln -svf "$f" "$of" + done + popd >/dev/null + done } upload() {