forked from Mirror/pmbootstrap
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 <caleb@postmarketos.org>
This commit is contained in:
parent
e547bb7f9c
commit
bfea00e03a
1 changed files with 5 additions and 34 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue