- Jul 08, 2024
-
-
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>
-
Caleb Connolly authored
Simplify the caching here and use logging.warn_once. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Caleb Connolly authored
Add a warn_once() function using Cache. Since we use f-strings everywhere we don't really need the varargs. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
- Jul 04, 2024
-
-
Oliver Smith authored
Don't crash on master_staging_systemd (and in the future the merged systemd branch) if "none" is selected as UI. Fix for: ERROR: Could not find aport for package: postmarketos-ui-none
-
- Jul 03, 2024
-
-
Fixes #2387
-
- Jul 02, 2024
-
-
Oliver Smith authored
The --aports argument gets parsed into a list, see pmb/parse/arguments.py: parser.add_argument( "-p", "--aports", help="postmarketos aports (pmaports) path", type=lambda x: [Path(p.strip()) for p in x.split(",")], ) Adjust pmb.types to reflect this. Fix for: pmb/helpers/args.py:58: error: "Path" has no attribute "__iter__"; maybe "__enter__"? (not iterable) [attr-defined]
-
Oliver Smith authored
According to git grep, nothing uses this. Looks like a refactoring leftover so remove it.
-
Oliver Smith authored
The aports argument is a list of paths now, so iterate over each of them when checking if they exist. Fix for: INFO:root:ERROR: 'list' object has no attribute 'exists'
-
-
Caleb Connolly authored
make ruff happy Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
- Jun 30, 2024
-
-
Oliver Smith authored
-
Oliver Smith authored
Move all kconfig rules from pmb.config to a separate toml file pmb/data/kconfigcheck.toml. This is a fallback, pmbootstrap now prefers loading kconfigcheck.toml from the currently checked out pmaports branch if it exists. This finally allows having separate kconfig check rules per pmaports branch and makes the workflow of adjusting these rules much more pleasant as the rules and kernel configs can just be adjusted at the same time in pmaports! This patch also moves the definition of what rules should be checked for community and main devices, those that have pmb:kconfigcheck-community in their linux APKBUILD, to the new kconfigcheck.toml. This should make it much more intuitive, previously one needed to find the place in the pmbootstrap source and edit it there. Furthermore the "enforce_check" logic is removed. Previously pmbootstrap would print warnings for failed config checks in some cases, but not exit with error which was very confusing. Now exit 0 means all checks passed and exit 1 means, that there is at least one error. Use toml for the file, as discussed in pmbootstrap issue 2165. Python 3.11 has a native toml reader, use tomli for previous Python versions for compatibility.
-
Oliver Smith authored
Create new pmb/commands/kconfig_check.py and _edit.py files and move related code there.
-
Oliver Smith authored
Prepare to move the kconfigcheck config into pmaports, so it can be different per branch and so we can adjust it at the same time as adjusting the kernel configs. Once it is moved, pmbootstrap will not know the cateogry names in advance anymore, so remove the logic for having category-specific argument names. In a future patch, we could add an option to manually override the categories to be tested with one specific category (taking a string argument), if there is demand for that.
-
Make sure we get a valid name in the rootfs type chroot. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
this turns out to have never been set??? We have config.device anyways, so let's use that instead. Tweaked-by:
Oliver Smith <ollieparanoid@postmarketos.org> Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Note by Oliver: this patch also removes the args argument from ask_for_username. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Fix error: rm: can't remove '/tmp/bootimg_parser': No such file or directory Fixes #2379
-
this fixes pmb.config.init: ask_for_ui.
-
Tweaked-By:
Oliver Smith <ollieparanoid@postmarketos.org>
-
- Jun 24, 2024
-
-
Python 3.10.12 fails without this patch: File "/media/gompa/73d88639-a730-456c-a428-6d500b4020b7/pmbootstrap/pmb/parse/arguments.py", line 844 help="Alpine Linux mirror, default: " f"{default_config.mirrors["alpine"]}", SyntaxError: f-string: unmatched '[' Related: https://peps.python.org/pep-0701/ (Commit message written by Oliver)
-
Newbyte authored
Instead of [PosixPath('/home/newbyte/.local/var/pmbootstrap/cache_git/pmaports')] you get /home/neboula/.local/var/pmbootstrap/cache_git/pmaports like before. Fixes envkernel.sh failing during activation. Closes https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2378
-
Newbyte authored
Checking if TYPE_CHECKING avoids the circular dependency.
-
Newbyte authored
Otherwise mypy doesn't check the return type
-
Newbyte authored
Otherwise pmbootstrap can't run these a few lines later. I don't know how this worked before, but this makes $ pmbootstrap kconfig migrate function again.
-
Newbyte authored
crosscompile() in autodetect.py expects <arch> to be an Arch type instead of a str, which is also probably what we want to move the entire codebase towards. As such, let's convert this string into an Arch here.
-
Newbyte authored
This explains a parameter, so let's put it in the right place.
-
Newbyte authored
-
- Ruff won't complain about long lines which end in a long URL. - The typing exception is no longer required.
-
-
- Jun 23, 2024
-
-
Oliver Smith authored
This is currently broken, and I'm about to rewrite a lot of related code. Just don't run the check for now, we can bring this back afterwards if we want to.
-
Oliver Smith authored
Fix for: TypeError: can only concatenate str (not "Arch") to str
-
Oliver Smith authored
Fix broken output_return=True, causing "pmbootstrap kconfig edit" to break.
-
Oliver Smith authored
Now that it is all passing, let's keep it that way!
-