diff options
author | eoli3n | 2020-05-11 19:43:24 +0200 |
---|---|---|
committer | eoli3n | 2020-05-11 19:43:24 +0200 |
commit | c4cbef66249894d6e04ea350570648a014a61929 (patch) | |
tree | 184fcd97e2d2d96806a36676be926b05e70b97f9 | |
parent | 1c60efcd30327280c7dfe267b74b22d0bb85a439 (diff) | |
download | aur-c4cbef66249894d6e04ea350570648a014a61929.tar.gz |
run only on upgrades
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 10-zectl-pre.hook | 2 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | README.md | 26 |
4 files changed, 20 insertions, 18 deletions
@@ -1,6 +1,6 @@ pkgbase = zectl-pacman-hook - pkgdesc = Create and prune zectl boot environments before any pacman command - pkgver = 0.1.0 + pkgdesc = Automate boot environment creation and rotation before pacman upgrade + pkgver = 0.1.1 pkgrel = 1 url = https://github.com/eoli3n/zectl-pacman-hook install = INSTALL diff --git a/10-zectl-pre.hook b/10-zectl-pre.hook index 69852b4dedd6..4bbacd46487f 100644 --- a/10-zectl-pre.hook +++ b/10-zectl-pre.hook @@ -1,6 +1,4 @@ [Trigger] -Operation = Remove -Operation = Install Operation = Upgrade Type = Package Target = * @@ -2,8 +2,8 @@ # Info: https://github.com/johnramsden/zectl/issues/16 pkgname=zectl-pacman-hook pkgrel=1 -pkgver=0.1.0 -pkgdesc="Create and prune zectl boot environments before any pacman command" +pkgver=0.1.1 +pkgdesc="Automate boot environment creation and rotation before pacman upgrade" arch=('any') url="https://github.com/eoli3n/$pkgname" license=('UNLICENSE') @@ -12,7 +12,7 @@ install="INSTALL" source=("10-zectl-pre.hook" "zectl-prune" "UNLICENSE") -sha256sums=("de9a144e6cda1911395b6491f2e83af0089a72e9eab92199d489b29919d76c2f" +sha256sums=("cc2d2f335bb2b636ed7b873be5f5fb8456f0cbfc877cd4b05f8b08dd7b4f9f53" "b38b0b2fca33ce64d5c1e713feb3bd7d3a0e85fa8d5c4c5220edefc2a63440da" "d3c4f1607c9488b22732511b83e6f6173d82499c0678c899666ca12c36517f72") diff --git a/README.md b/README.md index e34de895ca3a..f88f58310571 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,23 @@ ### zectl-pacman-hook -It will create a boot environment prefixed with ``pacmanhook`` with ``zectl`` at each use of pacman. By default, it keeps only 1 boot environment, each use of pacman will erase previously created boot environment. +It will create a boot environment prefixed with ``pacmanhook`` with ``zectl`` at each pacman upgrade. By default, it keeps only 1 boot environment, each pacman upgrade will overwrite previous boot environment. ```bash -$ LANG=C sudo pacman -S sl -warning: sl-5.02-5 is up to date -- reinstalling +$ sudo pacman -Syu +:: Synchronizing package databases... + core is up to date + extra is up to date + community is up to date + archzfs is up to date multilib is up to date +:: Starting full system upgrade... resolving dependencies... looking for conflicting packages... -Packages (1) sl-5.02-5 +Packages (1) bat-0.15.0-1 -Total Installed Size: 0.02 MiB -Net Upgrade Size: 0.00 MiB - -:: Proceed with installation? [Y/n] y +Total Installed Size: 4.57 MiB +Net Upgrade Size: 0.09 MiB +:: Proceed with installation? [Y/n] (1/1) checking keys in keyring [------------------------] 100% (1/1) checking package integrity [------------------------] 100% (1/1) loading package files [------------------------] 100% @@ -21,10 +25,10 @@ Net Upgrade Size: 0.00 MiB (1/1) checking available disk space [------------------------] 100% :: Running pre-transaction hooks... (1/1) Create a boot environment -• Destroyed pacmanhook-20200511T111356 -• Created pacmanhook-20200511T111422 +• Destroyed pacmanhook-20200411T121502 +• Created pacmanhook-20200511T193646 :: Processing package changes... -(1/1) reinstalling sl [------------------------] 100% +(1/1) upgrading bat [------------------------] 100% :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... ``` |