- Jul 15, 2024
-
-
Oliver Smith authored
Manual fixes for things that ruff didn't fix automatically. From python3 docs: > Union[X, Y] is equivalent to X | Y and means either X or Y.
-
Oliver Smith authored
-
Oliver Smith authored
Now that we have target-version = "py310" in [tool.ruff] in pyproject.toml, ruff check complains about using typing.Optional and typing.Union instead of newer syntax. Run the tool to fix it.
-
Oliver Smith authored
-
Tweaked-By:
Oliver Smith <ollieparanoid@postmarketos.org>
-
- Change some arguments' types to bool to avoid type mismatch errors after refactoring in the future - Add more arguments from parse/arguments with corresponding types - Change type of pmbootstrap log --lines argument to int
-
This was missed in fc010bc7 Before this fix: ``` ... [18:34:35] Enable background timer to prevent repeated sudo authorization? (y/n) [n]: y (020272) [18:34:44] ERROR: 'Config' object has no attribute 'mirrors_postmarketos' (020272) [18:34:44] See also: <https://postmarketos.org/troubleshooting> (020272) [18:34:44] Traceback (most recent call last): File "/home/arnavion/src/pmbootstrap/pmb/__init__.py", line 72, in main return config_init.frontend(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/arnavion/src/pmbootstrap/pmb/config/init.py", line 729, in frontend ask_for_additional_options(config) File "/home/arnavion/src/pmbootstrap/pmb/config/init.py", line 542, in ask_for_additional_options logging.info("Selected mirror:" f" {','.join(context.config.mirrors_postmarketos)}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/arnavion/src/pmbootstrap/pmb/core/config.py", line 130, in __getattribute__ return super().__getattribute__(key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Config' object has no attribute 'mirrors_postmarketos' ```
-
- Jul 13, 2024
-
-
Caleb Connolly authored
Was left in for debugging Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
If you init and set a custom work dir it will not be relative to pmaports anymore. Detect this and reset config.aports to be relative to the new workdir. Fixes #2406 Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
- Jul 11, 2024
-
-
Caleb Connolly authored
In ("build: special case building abuild (MR 2356)") we tried to ensure that abuild would be built before anything else, however this implementation failed miserably if the first package given didn't actually need to be built (since we skip building deps of packages that aren't flagged for build). Let's take a different stab at this by actually inserting build_packages into the build queue if they need building. They're inserted at the end just before the queue is reversed, so they will always be built first. This makes the order of pmb.config.build_packages important, enshrine this with a comment. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
If you build a package with --src but some dep is outdated, force you to build it (or otherwise handle the situation yourself). We can't guess what to do here. This could be made configurable (opt-in) in the future. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
We might have just built some other package which will later be used to build more packages. Handle all of them and don't special case abuild. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Let us install packages without announcing. Useful if there is some more contextual message display already. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Ensure we get our fork of apk straight away without having to run `apk upgrade -a` immediately afterwards. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
No reason to handle abuild separately here. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
-
- Jul 10, 2024
-
-
* Use NonBugError instead of RuntimeError so users don't get a stack trace for this. * Check for the pmbootstrap <= 3.0.0 config, and print a nice message asking users to recreate their config. * Add a separate message if --config was used. * Reword the generic "no config found" message to suggest 'pmbootstrap init' first, and only mention --config at the end. Most users will need to just run 'pmbootstrap init'.
-
Using pmbootstrap v3 with the old config can cause problems, for example when having $WORK in the pmaports dir instead of the actual work path. This is not supported anymore by v3 to reduce complexity. The format of how mirrors are stored in the config also has changed. Use a separate config file, so users can go back from v3 to 2.3.x if they need to (for figuring out a regression) and so users won't run into bugs when moving from 2.3.x to v3.
-
- Jul 09, 2024
-
-
Anri Dellal authored
-
- Jul 08, 2024
-
-
Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Was erronesously passing args to cli.confirm. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Since abuild is an implicit dependency of everything, we need special case handling for it. Insert it as a dependency of the first package in the build queue so that it will be built if outdated, then after building re-install it in the chroot so all subsequent packages will use the freshly built abuild. This is currently used for systemd where we use an abuild fork Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
chroot's aren't automatically initialized when running a command in them anymore. Add the explicit chroot.init() call before checksum. Fixes #2395 Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
During rework this got lost, re-incorporate it so packages built with --src have a relevant pkgver. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Oliver Smith authored
As we don't call apk from outside of the chroot, the paths need to be adjusted to be /mnt/pmbootstrap instead of the outside paths. This should be reverted together with the other TEMP commit after we upgraded apk to fix this properly (see issue 2388). Fixes: f5122420 ("TEMP: chroot: apk: run apk through QEMU again (MR 2351)")
-
Caleb Connolly authored
This revers b82c4eb1 ("chroot: always run apk static (MR 2252)") since the current iteration of the apk-tools /usr merge patches don't handle --root properly and will behave differently based on your host systems directory structure (specifially for /usr merge). This commit can be reverted once we fix apk-tools. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Add the missing runtime conversion when --config is given on the cmdline. This expects a pathlib.Path object as the argument, but args.config is only a string.
-
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 :)
-
Caleb Connolly authored
Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Since master_staging_systemd doesn't have its own channel, handle the special case where the user ran pmbootstrap init while on the systemd branch, with systemd enabled. In this case it's probably unintuitive to switch pmaports to the master branch. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Correct return types based on arguments Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Subtle... Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
By using a TypeVar we can make mypy give proper hints for the arguments and return type of cached functions, rather than just showing "Wrapper" as the type. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
* Cache the function so we only do the check once per-run * check all chroot's at once so the message will be printed near the start of output (rather than halfway through after building packages or something). Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
This can be used to build nicer log messages. For funsies let's try out @overload as well. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
dumping a stack trace directly to the console is not nice, keep it to the log file. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-