diff options
author | Jonas DOREL | 2020-10-24 00:09:43 +0200 |
---|---|---|
committer | Jonas DOREL | 2020-10-24 00:09:43 +0200 |
commit | c5fc60bf1efde4979acc23fbeb83c43832b282e6 (patch) | |
tree | a0dd14d61846c8a5775d30dbae9afae073b209df | |
download | aur-c5fc60bf1efde4979acc23fbeb83c43832b282e6.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | list-installed-packages.hook | 11 |
4 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..735bc76250e5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = pacman-hook-list-installed-packages + pkgdesc = Pacman hook to list installed packages in /etc/packages-list-native.txt and /etc/packages-list-foreign.txt + pkgver = latest + pkgrel = 1 + url = https://gitlab.com/jdorel-archlinux/pacman-hook-list-installed-packages + arch = any + license = GPL + makedepends = git + source = list-installed-packages.hook + md5sums = SKIP + sha256sums = 010b00d9804e65643609f7605661e9a16535729668bd9533db1d83daa7dce197 + +pkgname = pacman-hook-list-installed-packages + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..44fb6da96ff4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: Jonas DOREL <jonas at dorel dot me> +pkgname=pacman-hook-list-installed-packages +pkgver=latest +pkgrel=1 +pkgdesc="Pacman hook to list installed packages in /etc/packages-list-native.txt and /etc/packages-list-foreign.txt" +arch=('any') +url="https://gitlab.com/jdorel-archlinux/pacman-hook-list-installed-packages" +license=('GPL') +makedepends=('git') +source=('list-installed-packages.hook') +md5sums=('SKIP') +sha256sums=( + '010b00d9804e65643609f7605661e9a16535729668bd9533db1d83daa7dce197' +) + +pkgver() { + printf "latest" +} + +package() { + install -Dm 644 $srcdir/list-installed-packages.hook "$pkgdir/usr/share/libalpm/hooks/list-installed-packages.hook" +} diff --git a/README.md b/README.md new file mode 100644 index 000000000000..e812956edc7f --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +[](https://gist.github.com/cheerfulstoic/d107229326a01ff0f333a1d3476e068d) + +Pacman hook to list : + - native installed packages in /etc/packages-list-native.txt + - foreign installed packages in /etc/packages-list-foreign.txt diff --git a/list-installed-packages.hook b/list-installed-packages.hook new file mode 100644 index 000000000000..a227f7aec8a3 --- /dev/null +++ b/list-installed-packages.hook @@ -0,0 +1,11 @@ +[Trigger] +Operation = Install +Operation = Remove +Type = Package +Target = * + +[Action] +Description = Update packages lists in /etc +When = PostTransaction +# pacman -Qqe : List explicitly installed packages name. --native for pacman packages, --foreign for others (like from the AUR) +Exec = /bin/sh -c '/usr/bin/pacman -Qqe --native > /etc/packages-list-native.txt && /usr/bin/pacman -Qqe --foreign > /etc/packages-list-foreign.txt' |