Skip to content

Commit

Permalink
Fixes to get it working
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Dec 9, 2024
1 parent 1a808dd commit bb2c7c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/lib/cefs/root_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def consolidate(self) -> None:
self._catalog = {entry: dest_image / entry for entry, dest in self._catalog.items()}

def import_existing(self, root_dir: Path, subdirs: Iterable[Path], replace: bool = False) -> None:
with TemporaryDirectory(prefix="cefs-import") as tmp_dir:
with TemporaryDirectory(prefix="cefs-import", dir=self._config.image_root) as tmp_dir:
tmp_path = Path(tmp_dir)
tmp_sqfs = tmp_path / "temp.sqfs"
tmp_packfile = tmp_path / "packfile"
Expand Down
2 changes: 1 addition & 1 deletion bin/lib/cefs/squash.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, config: CefsConfig):

def import_existing_path(self, path: Path):
assert self._sha is None
with TemporaryDirectory(prefix="ce-squash-builder") as tmp_dir:
with TemporaryDirectory(prefix="ce-squash-builder", dir=self._config.image_root) as tmp_dir:
tmp_sqfs = Path(tmp_dir) / "temp.sqfs"
subprocess.check_call(
[
Expand Down
4 changes: 3 additions & 1 deletion bin/scripts/python_module_shim
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ if ! make -sq -C "${ROOT_DIR}" ce; then
exit 1
fi

PYTHON_ENV=$(cd "${ROOT_DIR}" && "${ROOT_DIR}/.poetry/bin/poetry" env info --path)

export PYTHONPATH=${ROOT_DIR}/bin
exec "${ROOT_DIR}/.env/bin/python3" -m "lib.${MY_NAME}" "$@"
exec "${PYTHON_ENV}/bin/python3" -m "lib.${MY_NAME}" "$@"

0 comments on commit bb2c7c6

Please sign in to comment.