From bfea00e03a3a7923acc91ad1bfabd2bfd8ffaf85 Mon Sep 17 00:00:00 2001 From: Caleb Connolly Date: Sat, 25 May 2024 00:51:28 +0200 Subject: [PATCH] config: pmaports: drop legacy checks (MR 2252) It's been 6(?) years since pmaports moved out of the pmbootstrap repo. Let's finally drop these checks. Signed-off-by: Caleb Connolly --- pmb/config/pmaports.py | 39 +++++---------------------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/pmb/config/pmaports.py b/pmb/config/pmaports.py index 89a6c511..e71fd7ef 100644 --- a/pmb/config/pmaports.py +++ b/pmb/config/pmaports.py @@ -12,21 +12,7 @@ import pmb.helpers.pmaports import pmb.parse.version -def check_legacy_folder(): - # Existing pmbootstrap/aports must be a symlink - link = pmb.config.pmb_src / "aports" - if os.path.exists(link) and not os.path.islink(link): - raise RuntimeError(f"The path '{link}' should be a" - " symlink pointing to the new pmaports" - " repository, which was split from the" - " pmbootstrap repository (#383). Consider" - " making a backup of that folder, then delete" - " it and run 'pmbootstrap init' again to let" - " pmbootstrap clone the pmaports repository and" - " set up the symlink.") - - -def clone(args: PmbArgs): +def clone(): logging.info("Setting up the native chroot and cloning the package build" " recipes (pmaports)...") @@ -34,19 +20,6 @@ def clone(args: PmbArgs): pmb.helpers.git.clone("pmaports") -def symlink(args: PmbArgs): - # Create the symlink - # This won't work when pmbootstrap was installed system wide, but that's - # okay since the symlink is only intended to make the migration to the - # pmaports repository easier. - link = pmb.config.pmb_src / "aports" - try: - os.symlink(args.aports, link) - logging.info(f"NOTE: pmaports path: {link}") - except: - logging.info(f"NOTE: pmaports path: {args.aports}") - - def check_version_pmaports(real): # Compare versions min = pmb.config.pmaports_min_version @@ -176,12 +149,10 @@ def read_config_channel(args: PmbArgs): " branch). Looks like a very old branch.") -def init(args: PmbArgs): - check_legacy_folder() - if not os.path.exists(args.aports): - clone(args) - symlink(args) - read_config(args) +def init(): + if not os.path.exists(get_context().aports): + clone() + read_config() def switch_to_channel_branch(args: PmbArgs, channel_new):