From 52abc67064c5f18cc62547c1b80141b2ee4eee63 Mon Sep 17 00:00:00 2001 From: mattia Date: Tue, 23 Dec 2025 15:37:12 +0000 Subject: [PATCH] Remove fedscm_admin bits I've extended the initial comment to better explain how to use the script and removed the `fedscm_admin` code since we're no longer maintain that tool. Signed-off-by: mattia --- packages/distgit/retire_packagers.py | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/packages/distgit/retire_packagers.py b/packages/distgit/retire_packagers.py index e9c4290..e845d5e 100644 --- a/packages/distgit/retire_packagers.py +++ b/packages/distgit/retire_packagers.py @@ -3,10 +3,13 @@ """ This script queries dist-git for all the packages a given packager maintains, has commit or watches. -Package that the packager is the main admin are then orphaned. The packager is -then removed from all packages that they have commit for and their watch status -is reset on every packages that they are watching. - +If used with the --retire flag, package that the packager is the main admin +are then orphaned. The packager is then removed from all packages that they +have commit for and their watch status is reset on every packages that they +are watching. +To use with the --retire flag you'll need a pagure (src.fp.o) token with the +appropriate rights and you'll need to pass it within the --api-token arg +or set it into the PAGURE_TOKEN env variable. """ import argparse @@ -270,22 +273,10 @@ def main(args): global pagure_token pagure_token = args.pagure_token - if not pagure_token and args.retire: - _log.debug( - "Trying to retrieve pagure_api_token from the fedscm configuration file" - ) - try: - import fedscm_admin.config - from fedscm_admin import CONFIG - - api_token = fedscm_admin.config.get_config_item(CONFIG, "pagure_api_token") - except: - pass - if not pagure_token and args.retire: print( "No pagure token set in the CLI argument or via the PAGURE_TOKEN " - "environment variable or found in the fedscm configuration file. " + "environment variable. " "Going to ignore --retire" ) args.retire = False