aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2024-03-13 21:09:21 -0700
committerZac Medico <zmedico@gentoo.org>2024-05-25 15:08:15 -0700
commit71d9ce40be5bbf533a6d1b59c5a460621c3c91c4 (patch)
tree58c0970583e02d78c8ea81df2359fed00047ff50 /bin
parentbinrepos.conf: Support "frozen" attribute (diff)
downloadportage-71d9ce40be5bbf533a6d1b59c5a460621c3c91c4.tar.gz
portage-71d9ce40be5bbf533a6d1b59c5a460621c3c91c4.tar.bz2
portage-71d9ce40be5bbf533a6d1b59c5a460621c3c91c4.zip
Add get_repo_revision_history function and repo_revisions file
The history of synced revisions is provided by a new get_repo_revision_history function and corresponding /var/lib/portage/repo_revisions file, with history limit currently capped at 25 revisions. If a change is detected and the current process has permission to update the repo_revisions file, then the file will be updated with any newly detected revisions. For volatile repos the revisions may be unordered, which makes them unusable for the purposes of the revision history, so the revisions of volatile repos are not tracked. This functions detects revisions which are not yet visible to the current process due to the sync-rcu option. The emaint revisions --purgerepos and --purgeallrepos options allow revisions for some or all repos to be easily purged from the history. For example, the emerge-webrsync script uses this emaint commmand to purge the revision history of the gentoo repo when the emerge-webrsync --revert option is used to roll back to a previous snapshot: emaint revisions --purgerepos="${repo_name}" Bug: https://bugs.gentoo.org/924772 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge-webrsync3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 99da05543..caa4986da 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
# Rewritten from the old, Perl-based emerge-webrsync script
@@ -732,6 +732,7 @@ main() {
[[ ${do_debug} -eq 1 ]] && set -x
if [[ -n ${revert_date} ]] ; then
+ emaint revisions --purgerepos="${repo_name}"
do_snapshot 1 "${revert_date}"
else
do_latest_snapshot