You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
os.system(f"chroot /.snapshots/rootfs/snapshot-chr{snap} sed -i 's|snapshot-chr{snap}|snapshot-{tmp}|g' /boot/{GRUB}/grub.cfg")
1167
-
#### os.system(f"chroot /.snapshots/rootfs/snapshot-chr{snap} sed -i '0,\|{distro_name}| s||{distro_name} snapshot {snap}|' /boot/{GRUB}/grub.cfg")
1168
1196
os.system(f"chroot /.snapshots/rootfs/snapshot-chr{snap} sed -i '0,\\|{distro_name}| s||{distro_name} snapshot{snap}|' /boot/{GRUB}/grub.cfg")
1169
1197
post_transactions(snap)
1170
1198
@@ -1302,6 +1330,7 @@ def main():
1302
1330
del_par=subparsers.add_parser("del",aliases=["delete","rm","rem","remove","rm-snapshot"],allow_abbrev=True,help="Remove snapshot(s)/tree(s) and any branches recursively")
aur=aur_install(snap,True,True)### TODO: do a paru -Si {pkg} check to avoid setup_aur if package already installed!
155
+
ifaur:
156
+
returnos.system(f"chroot /.snapshots/rootfs/snapshot-chr{snap} su aur -c\"paru -S{pkg} --needed --overwrite '/var/*'\"")
157
+
else:
158
+
print("F: AUR is not enabled!")
159
+
ifyes_no("Enable AUR?"):
160
+
print("Opening snapshot's config file... Please change AUR to True")
161
+
snapshot_config_edit(snap,True,False)### TODO move to core.py ? Run prepare but skip post transaction (Optimize code) Update: post_tran need to run too
162
+
aur=aur_install(snap,True,False)
163
+
returnaur
164
+
else:
165
+
return1
166
+
else:
167
+
return0
168
+
169
+
# Install atomic-operation
170
+
definstall_package_old(pkg,snap):
151
171
try:
152
172
# This extra pacman check is to avoid unwantedly triggering AUR if package is official but user answers no to prompt
173
+
### TODO IMPORTANT this doesn't work for a package group e.g. "lxqt" errors out even though it's not in AUR, which makes following code malfunction!
153
174
subprocess.check_output(f"pacman -Si{pkg}",shell=True,stderr=subprocess.PIPE)# --sysroot ### do not print if pkg not found
154
175
exceptsubprocess.CalledProcessError:
155
176
aur=aur_install(snap)### TODO: do a paru -Si {pkg} check to avoid setup_aur if package already installed!
Copy file name to clipboardExpand all lines: src/installer_core.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -58,11 +58,11 @@ def deploy_to_common():
58
58
ifis_efi:
59
59
os.system(f"{SUDO} umount /mnt/boot/efi")
60
60
os.system(f"{SUDO} umount /mnt/boot")
61
-
os.system(f'{SUDO} mount{bpifis_boot_externalelseos_root} -o{"subvol="+f"@boot{distro_suffix}"+","ifnotis_boot_externalelse""}compress=zstd,noatime /mnt/.snapshots/boot/boot-deploy')### REVIEW_LATER A similar line for is_home_external needed?
62
-
### if is_boot_external: # easier to read
63
-
### os.system(f"{SUDO} mount {bp} -o compress=zstd,noatime /mnt/.snapshots/boot/boot-deploy")
64
-
### else:
65
-
### os.system(ff"{SUDO} mount {os_root} -o subvol=@boot{distro_suffix},compress=zstd,noatime /mnt/.snapshots/boot/boot-deploy")
61
+
### os.system(f'{SUDO} mount {bp if is_boot_external else os_root} -o {"subvol="+f"@boot{distro_suffix}"+"," if not is_boot_external else ""}compress=zstd,noatime /mnt/.snapshots/boot/boot-deploy') ### REVIEW_LATER A similar line for is_home_external needed?