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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C65B315ACFB for ; Sun, 9 Apr 2023 16:06:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16465E07F9; Sun, 9 Apr 2023 16:06:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E5B70E07F9 for ; Sun, 9 Apr 2023 16:06:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E6842335D20 for ; Sun, 9 Apr 2023 16:06:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6BA689FA for ; Sun, 9 Apr 2023 16:06:19 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1681056375.6c70b47a0c9a8961b1115b486bda44d3d22aa42b.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/rsync-generation/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/rsync-generation/update-rsync-master.sh X-VCS-Directories: scripts/rsync-generation/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 6c70b47a0c9a8961b1115b486bda44d3d22aa42b X-VCS-Branch: master Date: Sun, 9 Apr 2023 16:06:19 +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: 1a0d5a79-bcf6-4f61-bd1a-6432d5c764fc X-Archives-Hash: 1d9f1d48bbd3d6e03c5f9eddc1537331 commit: 6c70b47a0c9a8961b1115b486bda44d3d22aa42b Author: Fabian Groffen gentoo org> AuthorDate: Sun Apr 9 16:05:26 2023 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Apr 9 16:06:15 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=6c70b47a scripts/rsync-generation/update-rsync-master.sh: use stronger git reset use git reset --hard HEAD to bring the tree out of any conflict or pollution state Signed-off-by: Fabian Groffen gentoo.org> scripts/rsync-generation/update-rsync-master.sh | 26 +++++++++++-------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/scripts/rsync-generation/update-rsync-master.sh b/scripts/rsync-generation/update-rsync-master.sh index d2e72ffec6..f4b12787d4 100755 --- a/scripts/rsync-generation/update-rsync-master.sh +++ b/scripts/rsync-generation/update-rsync-master.sh @@ -41,6 +41,12 @@ export PYTHONPATH PORTDIR PORTAGE_BASE_PATH PORTAGE_CONFIGROOT \ #### ---- git mtime helper ---- #### +update_git_tree() { + git reset -q --hard HEAD + git clean -dfq + git pull -q +} + apply_git_mtimes() { local from=$1 local to=$2 @@ -106,9 +112,7 @@ GLOBALSTART=${START} echo "($(date +"%F %R")) updating DTDs" pushd "$DTDDIR" || exit 1 fromcommit=$(git log --pretty=format:'%H' -n1) -git checkout -q . -git clean -dfq -git pull -q +update_git_tree tocommit=$(git log --pretty=format:'%H' -n1) apply_git_mtimes "${fromcommit}" "${tocommit}" popd || exit 1 @@ -121,9 +125,7 @@ echo "($(date +"%F %R")) set date to $(< "${RSYNCDIR}"/metadata/dtd/timestamp.ch echo "($(date +"%F %R")) updating GLSAs" pushd "$GLSADIR" || exit 1 fromcommit=$(git log --pretty=format:'%H' -n1) -git checkout -q . -git clean -dfq -git pull -q +update_git_tree tocommit=$(git log --pretty=format:'%H' -n1) apply_git_mtimes "${fromcommit}" "${tocommit}" popd || exit 1 @@ -136,9 +138,7 @@ echo "($(date +"%F %R")) set date to $(< "${RSYNCDIR}"/metadata/glsa/timestamp.c echo "($(date +"%F %R")) updating news" pushd "$NEWSDIR" || exit 1 fromcommit=$(git log --pretty=format:'%H' -n1) -git checkout -q . -git clean -dfq -git pull -q +update_git_tree tocommit=$(git log --pretty=format:'%H' -n1) apply_git_mtimes "${fromcommit}" "${tocommit}" popd || exit 1 @@ -165,9 +165,7 @@ START=$(date +%s) echo "($(date +"%F %R")) updating the gx86 tree" pushd "${GENTOOX86DIR}" || exit 1 fromcommit=$(git log --pretty=format:'%H' -n1) -git checkout -q . -git clean -dfq -git pull -q +update_git_tree tocommit=$(git log --pretty=format:'%H' -n1) gx86tscommit=$(git log --pretty=format:'%H %ct %cI' -n1 "${tocommit}") apply_git_mtimes "${fromcommit}" "${tocommit}" @@ -193,9 +191,7 @@ START=$(date +%s) echo "($(date +"%F %R")) updating Prefix tree (Git image)" pushd "$PREFIXTREEDIR" || exit 1 fromcommit=$(git log --pretty=format:'%H' -n1) -git checkout -q . -git clean -dfq -git pull -q +update_git_tree tocommit=$(git log --pretty=format:'%H' -n1) pfxtscommit=$(git log --pretty=format:'%H %ct %cI' -n1 "${tocommit}") apply_git_mtimes "${fromcommit}" "${tocommit}"