- Oct 29, 2024
-
-
Newbyte authored
We pass this check now.
-
Newbyte authored
-
Newbyte authored
They should definitely not be None here, thus assert it so we don't need to keep checking for None later.
-
Newbyte authored
It doesn't really make sense to check the blacklist against None, so just skip the value if it's None. Appeases mypy.
-
Newbyte authored
Otherwise, if pmb.parse.deviceinfo().cgpt_kpart is an empty string, for example, we end up passing an empty string to get_partition_layout() instead of False.
-
Newbyte authored
pmaports_cfg.get() can return other types, too. As such, we need to assert that it's a list to appease mypy.
-
Newbyte authored
Helps mypy understand the code better and also makes it easier to read as a human in my opinion.
-
Newbyte authored
I think the "these types make no sense" comment were about output_return_buffer, which defaulted to False but was to be set to list[bytes] if used. I changed it so that it defaults to None, which probably is more conventional. Other than that I didn't notice anything weird about the types here. Also check for None as necessary to appease mypy.
-
Newbyte authored
This could be done better with a real class instead of a TypedDict, but it's better than a regular dict.
-
Newbyte authored
Useful for annotating places where a parsed APKBUILD is expected.
-
Newbyte authored
This makes the behaviour match the docstring which specifies that this function returns integers.
-
Newbyte authored
This is equivalent to the previous definition, but more concise.
-
Newbyte authored
We don't want an actual Arch object in the environment object.
-
Newbyte authored
Can't construct a path by using the / operator on strings, so use the Path constructor instead.
-
Newbyte authored
If flavor is None here, something has gone wrong and the line after will fail. Explicitly assert that it has the right value to appease mypy.
-
Newbyte authored
Reusing this variable might lead to confusing bugs later if this code is changed in the future, and also leads to mypy being confused about the type of size_mb as it then gets assigned both str and int values.
-
Newbyte authored
At some point, this function was updated to use the Arch type instead of plain strings, but the return type was left omitted and the docstring outdated.
-
Newbyte authored
No parameter called "now" exists for this function, so don't document it.
-
Newbyte authored
This is already the default: https://mypy.readthedocs.io/en/stable/config_file.html#confval-color_output
-
Newbyte authored
And remove --check-untyped-defs from mypy.sh script to avoid duplication.
-
- Oct 27, 2024
-
-
Oliver Smith authored
Flush the progress bar displayed by the function before logging a warning message for 404 not found responses from the server. Without flushing, this message gets lost. In addition to the warning, display a NOTE and ERROR at the end to explain what went wrong: [20:16:50] Update package index for x86_64 (4 file(s)) [20:16:51] WARNING: file not found: http://mirror.postmarketos.org/postmarketos_get_404_test/edge/main/x86_64/APKINDEX.tar.gz [20:16:51] NOTE: check the [mirrors] section in 'pmbootstrap config' [20:16:51] ERROR: getting APKINDEX from binary package mirror failed! Without handling this properly, pmbootstrap would fail slightly later with a much less useful error: [15:14:28] ERROR: expected str, bytes or os.PathLike object, not NoneType Fixes: pmbootstrap issue 2424
-
Oliver Smith authored
-
Oliver Smith authored
Don't update the git URL again when coming from 7-2.x where this step was already done. This didn't fail, but was potentially confusing for the user since the git URLs were already upgraded from 7 -> 7-2x.
-
Some packages in aports have their own subpackages in their dependencies, for some reason. This causes our resolver to assume there is a cyclical dependency. Adjust the resolver to safely ignore these dependencies, since they'll be built as a part of the package that depends on them. For example, modemmanager depends on libmm-glib which is a subpackage of modemmanager. Currently to build modemmanager in pmaports it would be necessary to manually modify the APKBUILD after copying it from aports. This change avoids that. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Oliver Smith authored
-
Casey authored
args.autoinstall attribute might not exist, use getattr like for others, and add a fixme about the default value... Fixes: #2476 Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
All call sites that use this have been removed. This was only introduced as a stopgap until we could refactor more code to not use args everywhere, and that has now been achived. As such, remove this so it doesn't get used in more locations.
-
See #2473 Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Add a basic test to ensure that the cache does get hit as we expect. This doesn't test for cache conflicts. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Use a different way of keying the apkindex path cache. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
It may be desirable to test older versions of packages, allow them to be built when --force is specified and print a warning that they won't be installed automatically. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Seems to be ChromeOS specific: > this happens every time on my machine. I am on ChromeOS 129.0.6668.112 > using a Debian bookworm chroot through Crouton. I am not sure why > this is happening nor which layer is responsible for this. I deleted > the chroot and created another one but the problem persists. Commit msg tweaked by Oliver.
-
Newbyte authored
Provides kpartx.
-
Newbyte authored
Running these inside the chroot is tricky, and we ended up reverting previous commits that attempted to make them run there (see 1ec55fc1). As such, just accept defeat and ensure that the host has these. Also see postmarketOS/pmbootstrap#2465
-
Newbyte authored
We fully expect this to happen if a user hasn't configured their host system properly. As such, don't treat it like a programming error.
-
We now run the job in chroot, so remove the unnecessary check. If sphinx-build is missing for some reason, it will fail a bit further in the script anyways.
-