Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ def __init__(

self.post_base_install: list[Callable] = [] # type: ignore[type-arg]

# TODO: Figure out which one of these two we'll use.. But currently we're mixing them..
storage['session'] = self
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a breaking change for those scripting their own installations (not everyone uses guided.py or what's referenced in this repo.

This is mainly a note to self so I don't forget to mention that in the release notes.
We should perhaps have gone out with a breaking change notification in the previous release, but it's an easy sed -i "s/storage['session']/storage['installation_session']/g' <file> wherever it's used.

storage['installation_session'] = self

self._modules: list[str] = []
Expand Down
18 changes: 15 additions & 3 deletions archinstall/lib/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,21 @@
#
# And Keeping this in dict ensures that variables are shared across imports.
from pathlib import Path
from typing import Any
from typing import TYPE_CHECKING, NotRequired, TypedDict

storage: dict[str, Any] = {
'LOG_PATH': Path('/var/log/archinstall'),
if TYPE_CHECKING:
from archinstall.lib.boot import Boot
from archinstall.lib.installer import Installer


class _StorageDict(TypedDict):
LOG_FILE: Path
LOG_PATH: Path
active_boot: NotRequired['Boot | None']
installation_session: NotRequired['Installer']


storage: _StorageDict = {
'LOG_FILE': Path('install.log'),
'LOG_PATH': Path('/var/log/archinstall'),
}