Using a custom pmaports path is broken in several ways
pmbootstrap --aports
With pmb 2.x, this used to work (this is what CI scripts used to do):
$ pmbootstrap --aports /tmp/pmaports init
It would then write the dir to the config, and subsequent pmbootstrap
calls would automatically use it.
With pmb 3.x, --aports
gets silently ignored for at least the init command, and the default path is used.
pmbootstrap config aports
Fixed with !2374 (merged).
Furthermore this is broken in pmb 3.x:
$ pmbootstrap config aports /tmp/pmaports
[23:43:58] Config changed: aports='/tmp/pmaports'
$ pmbootstrap config aports
[PosixPath('/'), PosixPath('t'), PosixPath('m'), PosixPath('p'), PosixPath('/'), PosixPath('p'), PosixPath('m'), PosixPath('a'), PosixPath('p'), PosixPath('o'), PosixPath('r'), PosixPath('t'), PosixPath('s')]
I have a fix for that and will push it shortly, to work towards fixing #2411 (closed).
How to handle multiple pmaports dirs / overrides
@calebccff: looks like you sort of supported multiple pmaports directories.
- Could you give some context on the use case?
- Do we want to store them as CSV in the config? for the mirrors you proposed to not do that (and I agree it's not exactly elegant). So maybe if we do allow multiple pmaports dirs, we may want to store them differently in the config?
- The way the argument is parsed is also by splitting a string at comma. With argparse, we could also allow to set the argument multiple times.
- Maybe it makes more sense to change
pmbootstrap --aports <action>
to only have it inpmbootstrap init --aports
- or rather--pmaports
while at it? I think the way people use this is specifying the pmaports dir once while initializing and expecting it to get written to the config - so we might as well move it to theinit
action.
EDIT: related: #2386 (closed)
Edited by Oliver Smith