Skip to content
Snippets Groups Projects

core: pkgrepo: support arbitrarily named pmaports directories

Merged Caleb Connolly requested to merge caleb/custom-pmaports into master
  1. Nov 03, 2024
    • Caleb Connolly's avatar
      config: init: support --aports too (MR 2470) · d57b9e31
      Caleb Connolly authored and Oliver Smith's avatar Oliver Smith committed
      
      We shouldn't overwrite config.aports if the user specified a custom
      --aports directory. We only want to do this to update the default if
      they're using a custom workdir.
      
      Make the code here less aggressive, and correctly use the last entry in
      config.aports as "pmaports" instead of the first.
      
      Fixes: #2386
      Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
      Unverified
      d57b9e31
    • Caleb Connolly's avatar
      core: pkgrepo: support arbitrarily named pmaports directories (MR 2470) · a72a60f5
      Caleb Connolly authored and Oliver Smith's avatar Oliver Smith committed
      
      There was an oversight when this API was originally created and it
      implicitly assumed that the pmaports repository was always named
      "pmaports". This unfortunately broke some peoples workflows.
      
      Introduce a new "pkgrepo_name()" function and adjust the codebase to use
      it, as well as adjusting pkgrepo internally to special case the
      "pmaports" repo so that it's always named pmaports no matter what the
      directory itself is named.
      
      This is probably more complexity than we should be dealing with here, we
      should probably create a new type to encode this behaviour.
      
      Fixes: #2412
      Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
      Unverified
      a72a60f5
    • Caleb Connolly's avatar
      config: init: dont clobber config (MR 2470) · 70dc8552
      Caleb Connolly authored and Oliver Smith's avatar Oliver Smith committed
      
      When pmbootstrap starts up, it loads the config file (or uses the
      defaults) and then merged some arguments (e.g. --work) into it. However
      in config.init.frontend() we were creating yet another new Config, but
      it's too late to merge args in at this point...
      
      Rework this slightly to fix that major oversight and remove the totally
      unnecessary hack of calling pmb.config.load() again.
      
      This fixes calling pmbootstrap init with --work
      
      Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
      Unverified
      70dc8552
Loading