Skip to content
This repository was archived by the owner on Oct 16, 2022. It is now read-only.

Commit 27818ee

Browse files
committed
Installer: Fixed libgee dependency for arch; Updated main icon; Added support for Manjaro Linux;
1 parent 56851ba commit 27818ee

14 files changed

+206
-184
lines changed

icons/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Font is Mathjax_Fractur

icons/timeshift_2_black.xcf

-11 Bytes
Binary file not shown.

icons/timeshift_2_black_bold.xcf

13.9 KB
Binary file not shown.

icons/timeshift_2_white_bold.xcf

14.3 KB
Binary file not shown.

icons/timeshift_black_bold.png

3.15 KB
Loading

icons/timeshift_white_bold.png

3.41 KB
Loading

installer/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ app_fullname='Timeshift'
66
generic_depends=(rsync libgee json-glib)
77
debian_depends=(rsync libgee2 libjson-glib-1.0-0)
88
redhat_depends=(rsync libgee json-glib)
9-
arch_depends=(rsync libgee06 json-glib)
9+
arch_depends=(rsync libgee json-glib)
1010

1111
generic_recommends=()
1212
debian_recommends=()

src/Gtk/FinishBox.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ class FinishBox : Gtk.Box{
8282

8383
msg += _("◈ Avoid storing snapshots on your system partition. Using another partition will allow you to format and re-install the OS on your system partition without losing the snapshots stored on it. You can even install another Linux distribution and later roll-back the previous distribution by restoring the snapshot.") + "\n\n";
8484

85-
msg += _("◈ The first snapshot creates a copy of all files on your system. Subsequent snapshots only store files which have changed. You can reduce the size of snapshots by adding filters to exclude files which are not required. For example, you can exclude your web browser cache as these files change constantly and are not very important.") + "\n\n";
85+
msg += _("◈ The first snapshot creates a copy of all files on your system. Subsequent snapshots only store files which have changed. You can reduce the size of snapshots by adding filters to exclude files which are not required. For example, you can exclude your web browser cache as these files change constantly and are not important.") + "\n\n";
8686

87-
msg += _("◈ Common files are hard-linked between snapshots. Copying the files manually to another location will duplicate the files and break hard-links between them. Snapshots must be moved carefully by running 'rsync' from a terminal and the file system at destination path must support hard-links.") + "\n\n";
87+
msg += _("◈ Common files are hard-linked between snapshots. Copying the files manually to another location will duplicate the files and break hard-links between them. Snapshots must be moved carefully by running 'rsync' from a terminal. The file system at destination path must support hard-links.") + "\n\n";
8888

8989
lbl_message.label = msg;
9090
}

src/Gtk/RsyncLogWindow.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ public class RsyncLogWindow : Window {
462462
}
463463

464464
if (item.file_type == FileType.DIRECTORY){
465+
log_debug("Appending: %s".printf(item.file_path));
465466
tv_append_to_iter(ref model, ref iter0, item, odd_row, false);
466467
}
467468
}

src/Main.vala

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ public class Main : GLib.Object{
263263

264264
this.current_distro = LinuxDistro.get_dist_info("/");
265265
log_msg(_("Distribution") + ": " + current_distro.full_name());
266+
log_msg("DIST_ID" + ": " + current_distro.dist_id);
266267

267268
//check dependencies ---------------------
268269

@@ -2872,13 +2873,27 @@ public class Main : GLib.Object{
28722873

28732874
log_debug("grub_device=%s".printf(
28742875
(grub_device == null) ? "null" : grub_device));
2876+
2877+
var target_distro = LinuxDistro.get_dist_info(target_path);
28752878

28762879
sh_grub = "";
2880+
28772881
if (reinstall_grub2 && (grub_device != null) && (grub_device.length > 0)){
2882+
28782883
sh_grub += "sync \n";
28792884
sh_grub += "echo '' \n";
28802885
sh_grub += "echo '" + _("Re-installing GRUB2 bootloader...") + "' \n";
28812886

2887+
string chroot = "";
2888+
if (!restore_current_system){
2889+
if (target_distro.dist_id.down().contains("manjaro")){
2890+
chroot += "arch-chroot \"%s\"".printf(target_path);
2891+
}
2892+
else{
2893+
chroot += "chroot \"%s\"".printf(target_path);
2894+
}
2895+
}
2896+
28822897
// bind system directories for chrooted system
28832898
sh_grub += "for i in /dev /proc /run /sys; do mount --bind \"$i\" \"%s$i\"; done \n".printf(target_path);
28842899

@@ -2887,14 +2902,11 @@ public class Main : GLib.Object{
28872902

28882903
// re-install grub ---------------
28892904

2890-
var target_distro = LinuxDistro.get_dist_info(target_path);
2891-
28922905
if (target_distro.dist_id == "fedora"){
28932906

2894-
// this will run only on clone mode
2907+
// this will run only in clone mode
28952908

2896-
sh_grub += "chroot \"%s\" grub2-install --recheck %s \n".printf(
2897-
target_path, grub_device);
2909+
sh_grub += "%s grub2-install --recheck %s \n".printf(chroot, grub_device);
28982910

28992911
/* NOTE:
29002912
* grub2-install should NOT be run on Fedora EFI systems
@@ -2907,9 +2919,8 @@ public class Main : GLib.Object{
29072919
* kernels and restoring a snapshot with an older kernel.
29082920
*/
29092921
}
2910-
else{
2911-
sh_grub += "chroot \"%s\" grub-install --recheck %s \n".printf(
2912-
target_path, grub_device);
2922+
else {
2923+
sh_grub += "%s grub-install --recheck %s \n".printf(chroot, grub_device);
29132924
}
29142925

29152926
// create new grub menu
@@ -2918,20 +2929,25 @@ public class Main : GLib.Object{
29182929
// update initramfs --------------
29192930

29202931
if (target_distro.dist_id == "fedora"){
2921-
2922-
sh_grub += "chroot \"%s\" dracut -f -v \n".printf(target_path);
2932+
sh_grub += "%s dracut -f -v \n".printf(chroot);
2933+
}
2934+
else if (target_distro.dist_id.down().contains("manjaro")){
2935+
sh_grub += "%s mkinitcpio -p /etc/mkinitcpio.d/*.preset\n".printf(chroot);
29232936
}
29242937
else{
2925-
sh_grub += "chroot \"%s\" update-initramfs -u -k all \n".printf(target_path);
2938+
sh_grub += "%s update-initramfs -u -k all \n".printf(chroot);
29262939
}
29272940

29282941
// update grub menu --------------
29292942

29302943
if (target_distro.dist_id == "fedora"){
2931-
sh_grub += "chroot \"%s\" grub-mkconfig -o /boot/grub2/grub.cfg \n".printf(target_path);
2944+
sh_grub += "%s grub-mkconfig -o /boot/grub2/grub.cfg \n".printf(chroot);
2945+
}
2946+
else if (target_distro.dist_id.down().contains("manjaro")){
2947+
sh_grub += "%s update-grub \n".printf(chroot);
29322948
}
29332949
else{
2934-
sh_grub += "chroot \"%s\" update-grub \n".printf(target_path);
2950+
sh_grub += "%s update-grub \n".printf(chroot);
29352951
}
29362952

29372953
sh_grub += "echo '' \n";
@@ -2951,14 +2967,18 @@ public class Main : GLib.Object{
29512967

29522968
//sh += sh_grub;
29532969
}
2970+
else{
2971+
log_debug("skipping sh_grub: reinstall_grub2=%s, grub_device=%s".printf(
2972+
reinstall_grub2.to_string(), (grub_device == null) ? "null" : grub_device));
2973+
}
29542974

29552975
//reboot if required --------
29562976

29572977
if (restore_current_system){
29582978
sh_reboot += "echo '' \n";
29592979
sh_reboot += "echo '" + _("Rebooting system...") + "' \n";
2960-
//sh += "reboot -f \n";
2961-
sh_reboot += "shutdown -r now \n";
2980+
sh += "reboot -f \n";
2981+
//sh_reboot += "shutdown -r now \n";
29622982
}
29632983

29642984
//check if current system is being restored and do some housekeeping ---------

0 commit comments

Comments
 (0)