Skip to content

Commit 3f63919

Browse files
authored
Merge pull request #15 from Vanilla-OS/image-prep
Replace `apx2` with `apx`
2 parents 4ddcda8 + 0935b67 commit 3f63919

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

apx_gui/core/apx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
class Apx(ApxEntityBase):
2828

2929
def subsystems_list(self) -> list[Subsystem]:
30-
command = "apx2 subsystems list --json"
30+
command = "apx subsystems list --json"
3131
status, output = self._run_command(command)
3232
if not status:
3333
return []
@@ -54,7 +54,7 @@ def subsystems_list(self) -> list[Subsystem]:
5454
return subsystems
5555

5656
def stacks_list(self) -> list[Stack]:
57-
command = "apx2 stacks list --json"
57+
command = "apx stacks list --json"
5858
status, output = self._run_command(command)
5959
if not status:
6060
return []
@@ -75,7 +75,7 @@ def stacks_list(self) -> list[Stack]:
7575
return stacks
7676

7777
def pkgmanagers_list(self) -> list[PkgManager]:
78-
command = "apx2 pkgmanagers list --json"
78+
command = "apx pkgmanagers list --json"
7979
status, output = self._run_command(command)
8080
if not status:
8181
return []

apx_gui/core/apx_entities.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ def __init__(
7575
def create(self) -> [bool, "Stack"]:
7676
packages: str = " ".join(self.packages) if isinstance(self.packages, list) else self.packages
7777
command: str = (
78-
f"apx2 stacks new --name {self.name} --base {self.base} --packages \"{packages}\" "
78+
f"apx stacks new --name {self.name} --base {self.base} --packages \"{packages}\" "
7979
f"--pkg-manager {self.pkg_manager} -y"
8080
)
8181
res: [bool, str] = self._run_command(command)
8282
if not res[0]:
8383
return res[0], self
8484

85-
command: str = f"apx2 stacks list --json"
85+
command: str = f"apx stacks list --json"
8686
res: [bool, str] = self._run_command(command)
8787
if not res[0]:
8888
return res[0], self
@@ -100,13 +100,13 @@ def create(self) -> [bool, "Stack"]:
100100

101101
def update(self, base: str, packages: str, pkg_manager: str) -> [bool, str]:
102102
command: str = (
103-
f"apx2 stacks update --name {self.name} --base {base} --packages \"{packages}\" --pkg-manager {pkg_manager} -y"
103+
f"apx stacks update --name {self.name} --base {base} --packages \"{packages}\" --pkg-manager {pkg_manager} -y"
104104
)
105105
return self._run_command(command)
106106

107107
def remove(self, force: bool = False) -> [bool, str]:
108108
force_flag: str = "--force" if force else ""
109-
command: str = f"apx2 stacks rm {force_flag} --name {self.name}"
109+
command: str = f"apx stacks rm {force_flag} --name {self.name}"
110110
return self._run_command(command)
111111

112112

@@ -127,12 +127,12 @@ def __init__(
127127
self.exported_programs: Optional[dict] = exported_programs
128128

129129
def create(self) -> [bool, "Subsystem"]:
130-
command: str = f"apx2 subsystems new --name {self.name} --stack {self.stack.name}"
130+
command: str = f"apx subsystems new --name {self.name} --stack {self.stack.name}"
131131
res: [bool, str] = self._run_command(command)
132132
if not res[0]:
133133
return re[0], self
134134

135-
command: str = f"apx2 subsystems list --json"
135+
command: str = f"apx subsystems list --json"
136136
res: [bool, str] = self._run_command(command)
137137
if not res[0]:
138138
return res[0], self
@@ -148,17 +148,17 @@ def create(self) -> [bool, "Subsystem"]:
148148
return False, self
149149

150150
def update(self, stack: str) -> [bool, str]:
151-
command: str = f"apx2 subsystems update --name {self.name} --stack {stack} -y"
151+
command: str = f"apx subsystems update --name {self.name} --stack {stack} -y"
152152
return self._run_command(command)
153153

154154
def remove(self, force: bool = False) -> [bool, str]:
155155
force_flag: str = "--force" if force else ""
156-
command: str = f"apx2 subsystems rm {force_flag} --name {self.name}"
156+
command: str = f"apx subsystems rm {force_flag} --name {self.name}"
157157
return self._run_command(command)
158158

159159
def reset(self, force: bool = False) -> [bool, str]:
160160
force_flag: str = "--force" if force else ""
161-
command: str = f"apx2 subsystems reset {force_flag} --name {self.name}"
161+
command: str = f"apx subsystems reset {force_flag} --name {self.name}"
162162
return self._run_command(command)
163163

164164

@@ -196,7 +196,7 @@ def __init__(
196196

197197
def create(self) -> [bool, "PkgManager"]:
198198
command: str = (
199-
f"apx2 pkgmanagers new --name {self.name} --need-sudo {self.need_sudo} "
199+
f"apx pkgmanagers new --name {self.name} --need-sudo {self.need_sudo} "
200200
f"--autoremove {self.cmd_auto_remove} --clean {self.cmd_clean} "
201201
f"--install {self.cmd_install} --list {self.cmd_list} "
202202
f"--purge {self.cmd_purge} --remove {self.cmd_remove} "
@@ -207,7 +207,7 @@ def create(self) -> [bool, "PkgManager"]:
207207
if not res[0]:
208208
return res[0], self
209209

210-
command: str = f"apx2 pkgmanagers list --json"
210+
command: str = f"apx pkgmanagers list --json"
211211
res: [bool, str] = self._run_command(command)
212212
if not res[0]:
213213
return res[0], self
@@ -233,5 +233,5 @@ def create(self) -> [bool, "PkgManager"]:
233233

234234
def remove(self, force: bool = False) -> [bool, str]:
235235
force_flag: str = "--force" if force else ""
236-
command: str = f"apx2 pkgmanagers rm {force_flag} --name {self.name}"
237-
return self._run_command(command)
236+
command: str = f"apx pkgmanagers rm {force_flag} --name {self.name}"
237+
return self._run_command(command)

apx_gui/widgets/tab_subsystem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def subsystem(self) -> Subsystem:
7070
return self.__subsystem
7171

7272
def __on_console_clicked(self, button: Gtk.Button) -> None:
73-
GLib.spawn_command_line_async(f"kgx -e apx2 {self.__subsystem.name} enter")
73+
GLib.spawn_command_line_async(f"kgx -e apx {self.__subsystem.name} enter")
7474

7575
def __on_reset_clicked(self, button: Gtk.Button) -> None:
7676
def on_callback(result, *args) -> None:
@@ -117,4 +117,4 @@ def on_response(dialog: Adw.MessageDialog, response: str) -> None:
117117
dialog.add_response("ok", "Delete")
118118
dialog.set_response_appearance("ok", Adw.ResponseAppearance.DESTRUCTIVE)
119119
dialog.connect("response", on_response)
120-
dialog.present()
120+
dialog.present()

0 commit comments

Comments
 (0)