Use pacman -Qqen instead of paclist to list files
This commit is contained in:
parent
18763a8085
commit
519cb79498
@ -1,6 +1,13 @@
|
|||||||
Changelog for packaging-scripts
|
Changelog for packaging-scripts
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
Version 1.5.1
|
||||||
|
-------------
|
||||||
|
|
||||||
|
* pug2
|
||||||
|
|
||||||
|
* Add repository name to filename when uploading to gist
|
||||||
|
|
||||||
Version 1.5
|
Version 1.5
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
8
PKGBUILD
8
PKGBUILD
@ -1,16 +1,16 @@
|
|||||||
# Maintainer: Eric Torres <erictorres4@protonmail.com>
|
# Maintainer: Eric Torres <erictorres4@protonmail.com>
|
||||||
pkgname=packaging-scripts
|
pkgname=packaging-scripts
|
||||||
pkgver=1.5
|
pkgver=1.5.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="A set of helper scripts for handling Arch Linux packages"
|
pkgdesc="A set of helper scripts for handling Arch Linux packages"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
groups=(pacman-helpers)
|
groups=(pacman-helpers)
|
||||||
depends=(pacman python pacman-contrib)
|
depends=(pacman python)
|
||||||
makedepends=(git python-setuptools)
|
makedepends=(git python-setuptools)
|
||||||
optdepends=('fzf: for the fqo script'
|
optdepends=('fzf: for the fqo script'
|
||||||
'mlocate: for the fqo script')
|
'mlocate: for the fqo script')
|
||||||
checkdepends=('python-hypothesis')
|
checkdepends=(python-hypothesis python-pytest)
|
||||||
backup=(etc/apparmor.d/usr.bin.{addpkg,delpkg}
|
backup=(etc/apparmor.d/usr.bin.{addpkg,delpkg}
|
||||||
etc/packaging-scripts.conf)
|
etc/packaging-scripts.conf)
|
||||||
source=("${pkgname}::git+file:///home/etorres/Projects/packaging-scripts")
|
source=("${pkgname}::git+file:///home/etorres/Projects/packaging-scripts")
|
||||||
@ -43,7 +43,7 @@ package() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# install pug hook
|
# install pug hook
|
||||||
install -Dm644 'misc/pug.hook' "${pkgdir}/usr/share/libalpm/hooks"
|
install -Dm644 'misc/pug.hook' "${pkgdir}/usr/share/libalpm/hooks/pug.hook"
|
||||||
|
|
||||||
# install zsh completions
|
# install zsh completions
|
||||||
install -d "${pkgdir}/usr/share/zsh/site-functions"
|
install -d "${pkgdir}/usr/share/zsh/site-functions"
|
||||||
|
9
bin/pug2
9
bin/pug2
@ -18,7 +18,7 @@ import packaging_scripts.pacman as pacman
|
|||||||
|
|
||||||
# ========== Constants ==========
|
# ========== Constants ==========
|
||||||
# Commands
|
# Commands
|
||||||
PACLIST_CMD = "/usr/bin/paclist"
|
PACMAN_CMD = "/usr/bin/pacman"
|
||||||
LOCALE = "utf-8"
|
LOCALE = "utf-8"
|
||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
@ -82,14 +82,13 @@ if __name__ == "__main__":
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
filename = args.filename
|
filename = args.filename
|
||||||
repo = args.repo
|
repo = args.repository
|
||||||
|
|
||||||
# Run process that lists packages
|
# Run process that lists packages
|
||||||
packages = subprocess.run([PACLIST_CMD, args.repo], capture_output=True).stdout
|
packages = subprocess.run([PACMAN_CMD, "-Qqem"], capture_output=True).stdout
|
||||||
|
|
||||||
# Write package list to file and perform upload
|
# Write package list to file and perform upload
|
||||||
with tempfile.NamedTemporaryFile() as tmpfile:
|
with tempfile.NamedTemporaryFile() as tmpfile:
|
||||||
tmpfile.write(packages)
|
tmpfile.write(packages)
|
||||||
# Upload file through gist
|
|
||||||
# We use the filename in the command, not in the tempfile so gist knows what to upload as
|
# We use the filename in the command, not in the tempfile so gist knows what to upload as
|
||||||
# subprocess.run(['gist', '-f', args.filename, tmpfile.name])
|
subprocess.run(["gist", "-f", args.filename, tmpfile.name])
|
||||||
|
2
setup.py
2
setup.py
@ -16,7 +16,7 @@ with open("README.rst", "r") as fh:
|
|||||||
# ========== Package Setup ==========
|
# ========== Package Setup ==========
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="packaging_scripts",
|
name="packaging_scripts",
|
||||||
version="1.5.0",
|
version="1.5.1",
|
||||||
author="Eric Russel Torres",
|
author="Eric Russel Torres",
|
||||||
author_email="erictorres4@protonmail.com",
|
author_email="erictorres4@protonmail.com",
|
||||||
description="A set of helpers for automating borg interaction",
|
description="A set of helpers for automating borg interaction",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user