machineconfig 5.46__py3-none-any.whl → 5.48__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/profile/create_helper.py +10 -0
- machineconfig/profile/create_links.py +0 -5
- machineconfig/utils/links.py +14 -0
- {machineconfig-5.46.dist-info → machineconfig-5.48.dist-info}/METADATA +1 -1
- {machineconfig-5.46.dist-info → machineconfig-5.48.dist-info}/RECORD +8 -8
- {machineconfig-5.46.dist-info → machineconfig-5.48.dist-info}/WHEEL +0 -0
- {machineconfig-5.46.dist-info → machineconfig-5.48.dist-info}/entry_points.txt +0 -0
- {machineconfig-5.46.dist-info → machineconfig-5.48.dist-info}/top_level.txt +0 -0
|
@@ -16,10 +16,20 @@ def copy_assets_to_machine(which: Literal["scripts", "settings"]):
|
|
|
16
16
|
case "scripts":
|
|
17
17
|
source = LIBRARY_ROOT.joinpath("scripts", system)
|
|
18
18
|
target = CONFIG_ROOT.joinpath("scripts", system)
|
|
19
|
+
|
|
19
20
|
case "settings":
|
|
20
21
|
source = LIBRARY_ROOT.joinpath("settings")
|
|
21
22
|
target = CONFIG_ROOT.joinpath("settings")
|
|
22
23
|
from machineconfig.utils.path_extended import PathExtended
|
|
23
24
|
PathExtended(source).copy(folder=target.parent, overwrite=True)
|
|
25
|
+
import platform
|
|
26
|
+
system = platform.system().lower()
|
|
27
|
+
if system == "linux" and which == "scripts":
|
|
28
|
+
import subprocess
|
|
29
|
+
from rich.console import Console
|
|
30
|
+
console = Console()
|
|
31
|
+
console.print("\n[bold]📜 Setting executable permissions for scripts...[/bold]")
|
|
32
|
+
subprocess.run(f"chmod +x {CONFIG_ROOT.joinpath(f'scripts/{system.lower()}')} -R", shell=True, capture_output=True, text=True)
|
|
33
|
+
console.print("[green]✅ Script permissions updated[/green]")
|
|
24
34
|
|
|
25
35
|
|
|
@@ -213,11 +213,6 @@ def apply_mapper(mapper_data: dict[str, list[ConfigMapper]],
|
|
|
213
213
|
ERROR_LIST.append(e)
|
|
214
214
|
console.print(f"❌ [red]Error setting SSH permissions[/red]: {e}")
|
|
215
215
|
|
|
216
|
-
if system == "Linux":
|
|
217
|
-
console.print("\n[bold]📜 Setting executable permissions for scripts...[/bold]")
|
|
218
|
-
subprocess.run(f"chmod +x {CONFIG_ROOT.joinpath(f'scripts/{system.lower()}')} -R", shell=True, capture_output=True, text=True)
|
|
219
|
-
console.print("[green]✅ Script permissions updated[/green]")
|
|
220
|
-
|
|
221
216
|
# Display operation summary table
|
|
222
217
|
if operation_records:
|
|
223
218
|
table = Table(title="🔗 Symlink Operations Summary", show_header=True, header_style="bold magenta")
|
machineconfig/utils/links.py
CHANGED
|
@@ -121,6 +121,13 @@ def symlink_map(config_file_default_path: PathExtended, self_managed_config_file
|
|
|
121
121
|
action_taken = ""
|
|
122
122
|
details = ""
|
|
123
123
|
|
|
124
|
+
# Handle broken symlinks first - they exist as symlinks but point to non-existent targets
|
|
125
|
+
if config_file_default_path.is_symlink() and not config_file_default_path.exists():
|
|
126
|
+
action_taken = "fixing_broken_link"
|
|
127
|
+
details = "Removed broken symlink and will create new one"
|
|
128
|
+
console.print(Panel(f"🔄 FIXING BROKEN LINK | Removing broken symlink {config_file_default_path}, will create link to {self_managed_config_file_path}", title="Fixing Broken Link", expand=False))
|
|
129
|
+
config_file_default_path.unlink()
|
|
130
|
+
|
|
124
131
|
# Case analysis based on docstring
|
|
125
132
|
if config_file_default_path.exists():
|
|
126
133
|
if self_managed_config_file_path.exists():
|
|
@@ -238,6 +245,13 @@ def copy_map(config_file_default_path: PathExtended, self_managed_config_file_pa
|
|
|
238
245
|
action_taken = ""
|
|
239
246
|
details = ""
|
|
240
247
|
|
|
248
|
+
# Handle broken symlinks first - they exist as symlinks but point to non-existent targets
|
|
249
|
+
if config_file_default_path.is_symlink() and not config_file_default_path.exists():
|
|
250
|
+
action_taken = "fixing_broken_link"
|
|
251
|
+
details = "Removed broken symlink and will copy new file"
|
|
252
|
+
console.print(Panel(f"🔄 FIXING BROKEN LINK | Removing broken symlink {config_file_default_path}, will copy from {self_managed_config_file_path}", title="Fixing Broken Link", expand=False))
|
|
253
|
+
config_file_default_path.unlink()
|
|
254
|
+
|
|
241
255
|
match (config_file_default_path.exists(), self_managed_config_file_path.exists()):
|
|
242
256
|
case (True, True):
|
|
243
257
|
# Both files exist
|
|
@@ -94,8 +94,8 @@ machineconfig/jobs/windows/msc/cli_agents.ps1,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
|
|
|
94
94
|
machineconfig/profile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
95
95
|
machineconfig/profile/backup.toml,sha256=Hb25sIdKVvLqOF62NgiOpGZxd45I6IhsNHu623RtfQQ,766
|
|
96
96
|
machineconfig/profile/bash_shell_profiles.md,sha256=mio0xkMTwO-F3fikWIfgcdQaPCmQrmkxJMNtZsTe9TI,514
|
|
97
|
-
machineconfig/profile/create_helper.py,sha256=
|
|
98
|
-
machineconfig/profile/create_links.py,sha256=
|
|
97
|
+
machineconfig/profile/create_helper.py,sha256=_iNeuwmcEGTx6sf_f40JKHfOCuJRZQRpyE8Fo_3Q6bI,1519
|
|
98
|
+
machineconfig/profile/create_links.py,sha256=_Tr9Kl8OodU8c45a7f-f8qQecrJZClfZJl7ZoRat_60,13638
|
|
99
99
|
machineconfig/profile/create_links_export.py,sha256=OEmuJE-F7FZX5xvOl1rqJzHg_BWtPKCiWdrq4RPOobs,3173
|
|
100
100
|
machineconfig/profile/create_shell_profile.py,sha256=ifsEAK90ovvY7ftyxuY5-Xh8f2JuQYX7IMYUXp6x2Sw,9538
|
|
101
101
|
machineconfig/profile/mapper.toml,sha256=oXWCWF8yyVHC8FncFqTPiRGgdHAhgGbpS4tYAjKlw3I,12886
|
|
@@ -370,7 +370,7 @@ machineconfig/utils/accessories.py,sha256=W_9dLzjwNTW5JQk_pe3B2ijQ1nA2-8Kdg2r7VB
|
|
|
370
370
|
machineconfig/utils/code.py,sha256=0sAlozPgbbGwNE0sksK1XiBMyfCBtBt5d_6ExL1K9_8,6489
|
|
371
371
|
machineconfig/utils/installer.py,sha256=ZnhW_gRmGlq5uXwzNvIn-x1vXuOJxkzVqjNu188f37s,10465
|
|
372
372
|
machineconfig/utils/io.py,sha256=rzEwAnq-gyT29Y4CDHHGxAA6ddIIFOCxrqZ6dn0ALa4,2255
|
|
373
|
-
machineconfig/utils/links.py,sha256=
|
|
373
|
+
machineconfig/utils/links.py,sha256=KM6vIn3hag9FYEzLSHP5MAM9tU_RStw2mCq2_OvmmZA,23672
|
|
374
374
|
machineconfig/utils/notifications.py,sha256=tuXIudcip0tEioG-bm8BbLr3FMDve4f6BktlznBhKxM,9013
|
|
375
375
|
machineconfig/utils/options.py,sha256=vUO4Kej-vDOv64wHr2HNDyu6PATURpjd7xp6N8OOoJg,7083
|
|
376
376
|
machineconfig/utils/path_extended.py,sha256=Xjdn2AVnB8p1jfNMNe2kJutVa5zGnFFJVGZbw-Bp_hg,53200
|
|
@@ -403,8 +403,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=Xbi59rU35AzR
|
|
|
403
403
|
machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoSpdmTIdgS9LS-RvE-QZ-D260tD3o,1214
|
|
404
404
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
|
|
405
405
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
406
|
-
machineconfig-5.
|
|
407
|
-
machineconfig-5.
|
|
408
|
-
machineconfig-5.
|
|
409
|
-
machineconfig-5.
|
|
410
|
-
machineconfig-5.
|
|
406
|
+
machineconfig-5.48.dist-info/METADATA,sha256=qZhpHqE4_yJoY8G2pSshCCLUE4nI1YZmTuZeg9NjEBQ,3111
|
|
407
|
+
machineconfig-5.48.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
408
|
+
machineconfig-5.48.dist-info/entry_points.txt,sha256=z7b9guivf0GSKUG6b8ALgbDoRg2LuPfkGP_p-PxgX9g,469
|
|
409
|
+
machineconfig-5.48.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
410
|
+
machineconfig-5.48.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|