debian-forge/osbuild
Tomáš Hozza 3ae8f25f55 Testutil/importlib: don't write bytecode when importing modules
Cache files will split the extension, this means that all pyc cache
files looks like we get many clashing `org.osbuild.cpython-py311.pyc
files. Moreover, the cache bytecode invalidation is based on the
timestamp (which is the same after git checkout) and the file size
(which may be the same for two different files). This means that we
can't rely on the cache files.

This issue has been found after the previous commit made the
`org.osbuild.systemd` and `org.osbuild.selinux` stages to have exactly
the same size, which caused the interpreter to reuse the bytecode for
the selinux stage when running unit tests for the systemd stage. This
resulted in consistent and weird failures when the systemd stage
options were passed to the selinux stage code.

The credit for this fix goes to Michael Vogt, who found the cause and
fix. Also thanks to Simon de Vlieger for his help with debugging the
problem.

Co-authored-by: Michael Vogt <michael.vogt@gmail.com>
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-04-22 16:33:59 +02:00
..
formats format/v2: add new "partition" field to "describe_mount" 2023-12-22 10:18:29 -05:00
testutil Testutil/importlib: don't write bytecode when importing modules 2024-04-22 16:33:59 +02:00
util util: Rename function 2024-03-25 18:26:53 +01:00
__init__.py Post release version bump 2024-04-15 09:09:06 +00:00
__main__.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
api.py Fix errors reported by new version of mypy 2023-04-12 11:57:18 +02:00
buildroot.py osbuild: make the entire /etc/selinux avaialble for the buildroot 2024-03-22 11:24:35 +01:00
devices.py osbuild: error when {Device,Mount} is modified after creation 2024-01-19 02:54:26 +01:00
host.py tox: add tox 2023-08-01 15:01:13 +02:00
inputs.py osbuild: error when {Device,Mount} is modified after creation 2024-01-19 02:54:26 +01:00
loop.py Revert "osbuild: ensure loop.Loop() has the required device node" 2024-03-13 22:16:51 +02:00
main_cli.py osbuild: fix newline issue with final output 2024-04-12 13:41:04 +02:00
meta.py meta: automatically allow devices as input in the stages schemas 2024-04-16 08:04:43 +02:00
mixins.py osbuild: error when {Device,Mount} is modified after creation 2024-01-19 02:54:26 +01:00
monitor.py monitor: make origin a setter 2024-03-12 16:44:12 +01:00
mounts.py mounts/ostree.deployment: support deployments on mount 2024-01-31 16:46:01 -05:00
objectstore.py objectstore: add new skip_preserve_owner to Object.export() 2023-12-20 09:28:39 +01:00
pipeline.py osbuild: add workaround to integrate sources into progress reporting 2024-03-12 16:44:12 +01:00
remoteloop.py osbuild: reuse loop_for_fd() in LoopServer 2024-03-11 10:56:49 +01:00
sources.py sources: transform() is only used in the curl sources, remove from ABC 2024-03-19 14:21:57 +01:00