commit: 5edf4429c3ac157826349eab9a9333ab67cfa171 Author: Lucio Sauer <watermanpaint <AT> posteo <DOT> net> AuthorDate: Thu Jun 6 12:50:55 2024 +0000 Commit: David Roman <davidroman96 <AT> gmail <DOT> com> CommitDate: Thu Jun 6 12:54:40 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5edf4429
app-backup/timeshift-autosnap: Fix dependencies No build-time deps needed Fix patch that erroneously removed optional runtime dep detection altogether Fix runtime deps Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net> .../timeshift-autosnap-remove-arch-specific.patch | 21 +++++++++++++++++---- ...-0.9.ebuild => timeshift-autosnap-0.9-r1.ebuild} | 9 +++------ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app-backup/timeshift-autosnap/files/timeshift-autosnap-remove-arch-specific.patch b/app-backup/timeshift-autosnap/files/timeshift-autosnap-remove-arch-specific.patch index a778006bf..127f880bb 100644 --- a/app-backup/timeshift-autosnap/files/timeshift-autosnap-remove-arch-specific.patch +++ b/app-backup/timeshift-autosnap/files/timeshift-autosnap-remove-arch-specific.patch @@ -1,10 +1,23 @@ +Partially backport 0f933eb5966848d96477b5148e40ac1c3e750e22 for distro-agnostic +detection of grub-btrfs snapshot functionality. + +Author: Lucio Sauer <[email protected]> --- a/timeshift-autosnap +++ b/timeshift-autosnap -@@ -53,7 +53,7 @@ if $(get_property "deleteSnapshots" "boolean" "true") ; then +@@ -53,8 +53,12 @@ if $(get_property "deleteSnapshots" "boolean" "true") ; then fi fi; -if $(get_property "updateGrub" "boolean" "true") && [ "$(pacman -Qs ^grub-btrfs$)" ]; then -+if $(get_property "updateGrub" "boolean" "true") ; then - grub-mkconfig -o /boot/grub/grub.cfg - fi; +- grub-mkconfig -o /boot/grub/grub.cfg +-fi; +- ++if $(get_property "updateGrub" "boolean" "true") && [ -f /etc/grub.d/41_snapshots-btrfs ]; then ++ . /etc/default/grub-btrfs/config ++ if [ -s "${GRUB_BTRFS_GRUB_DIRNAME:-/boot/grub}/grub-btrfs.cfg" ]; then ++ /etc/grub.d/41_snapshots-btrfs ++ else ++ ${GRUB_BTRFS_MKCONFIG:-grub-mkconfig} -o ${GRUB_BTRFS_GRUB_DIRNAME:-/boot/grub}/grub.cfg ++ fi ++fi + exit 0 diff --git a/app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild b/app-backup/timeshift-autosnap/timeshift-autosnap-0.9-r1.ebuild similarity index 88% rename from app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild rename to app-backup/timeshift-autosnap/timeshift-autosnap-0.9-r1.ebuild index 4209aebe5..36a6cbead 100644 --- a/app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild +++ b/app-backup/timeshift-autosnap/timeshift-autosnap-0.9-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit readme.gentoo-r1 +inherit optfeature readme.gentoo-r1 DESCRIPTION="Automatically creates a timeshift-snapshot when executed" HOMEPAGE="https://gitlab.com/gobonja/timeshift-autosnap" @@ -13,11 +13,7 @@ LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" -DEPEND=" - app-backup/timeshift - >=sys-apps/portage-2.1 -" -RDEPEND="${DEPEND}" +RDEPEND="app-backup/timeshift" PATCHES=( "${FILESDIR}/${PN}-remove-arch-specific.patch" ) @@ -36,4 +32,5 @@ src_install(){ pkg_postinst() { readme.gentoo_print_elog + optfeature "grub-btrfs snapshot support" app-backup/grub-btrfs }
