1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

args: remove dead code (MR 2349)

Remove a bunch of commented out code:
* debug leftovers
* update_work(): a function that used to replace $WORK in all kinds of
  arguments to pmbootstrap, with the actual work dir. This seemed like a
  good idea when I made this initially, but in hindsight it's clear that
  this made args just much more complex. I'm glad that Caleb removed
  this. Now $WORK only gets removed in one place, for mount points,
  which makes much more sense.
* args.from_argparse and related comment: pmbootstrap used to make a
  full copy of its args, so in some cases it could go back before $WORK
  was replaced IIRC. This isn't great, but even worse is that this
  caused each stack trace to say something like infinite recursion on
  args. I'm also glad that Caleb got rid of this :)
This commit is contained in:
Oliver Smith 2024-07-07 20:27:42 +02:00 committed by Caleb Connolly
parent 0e62eaac67
commit 852b8d6c7d
No known key found for this signature in database
GPG key ID: 0583312B195F64B6
2 changed files with 0 additions and 27 deletions

View file

@ -1277,12 +1277,8 @@ def get_parser():
def arguments():
# Parse and extend arguments (also backup unmodified result from argparse)
args: PmbArgs = get_parser().parse_args()
# setattr(args, "from_argparse", copy.deepcopy(args))
# setattr(args.from_argparse, "from_argparse", args.from_argparse)
if getattr(args, "fork_alpine_retain_branch", False):
# fork_alpine_retain_branch largely matches the behaviour of fork_alpine, so
# just set fork_alpine here to reduce repetition.