You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This update is a major update focusing on quality of life features and enhanced functionality. Users can update from Pacstall 3.14.0 or higher with pacstall -U pacstall:master, or reinstall using the deb file.
If you are a pacscript maintainer, there are a couple things you must do:
Merging of version and pkgver() (variable/function)
description -> pkgdesc (variable)
build_depends -> makedepends (array)
postinst -> post_install (function)
preinst -> pre_install (function)
removescript -> post_remove (function)
pkgrel (variable)
For the merging of version and pkgver(), you'll need to do the following steps:
If you are a non-git package, rename version to pkgver. If you are a git package, add the pkgver variable and the pkgver() function. The variable should have the latest tag at the time of updating the pacscript, and the pkgver() function should retrieve the latest shasum.
So basically, if you are a non-git package, you have to change a variable name, and if you are a git package, you remove version="$(pkgver)" and add pkgver=<tag>.
We also are introducing the pkgrel variable. This can be used when you wish to trigger an update on a users computer but ${pkgver} has not been changed, such as fixing a broken build process. Unlike PKGBUILDs, this variable is optional and will default to 1 if not included.
👉 Click here to get a simple script to get the tag
url="put in url here"
ver="$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname'"${url}" \| cut --delimiter='/' --fields=3 \| tr '-''~' \| sort --version-sort \| tail --lines=1)"if [[ -z${ver} ]];thenecho"0.0.1"# pkgver should be 0.0.1 if they have no tags yetelseecho"${ver}"fi
📝 Examples
Here we have an old pacscript snippet:
name="foo"
version="1.0.2"
description="A fast fooer"
build_depends=('foo-dev''fork')
To convert to 4.0.0, this pacscript should look like this:
name="foo"
pkgver="1.0.2"
pkgdesc="A fast fooer"
makedepends=('foo-dev''fork')
If you run pacstall -L now, you'll be seeing something different than before:
This will show you much more information about the package. -Qi can still be used to query an individual package information. If -L detects it's being used non-interactively, it will fallback to the old style, which is much more suited for for scripting, so if you are using the output of pacstall -L in a script, nothing should change for you.
Metadata queries in -Qi
Previously, if you wanted the raw metadata to parse or use, you would have to source the metadata file and run what you needed on that. That's not the most effective, so now you can add a second argument to -Qi, which is the name of the piece of metadata you want. They follow the output of -Qi sections, and spaces are replaced with underscores:
-B downloading url on deb packages
The -B flag, which is used to create but not install a deb, doesn't make much sense to use on a deb pacscript, so now, -B on any deb package will download url instead.
Pacscript for this releases Deb
name="pacstall"
pkgver="4.0.0"
pkgdesc="An AUR-inspired package manager for UbuntuPacstall is the AUR Ubuntu wishes it had. It takes the concept of the AURand puts a spin on it, making it easier to install programs without scouringgithub repos and the likes"
homepage='https://pacstall.dev'
depends=("bash""curl""wget""unzip""build-essential""sensible-utils""git")
optdepends=(
"axel: faster file downloads"
)
maintainer="Pacstall Team <pacstall@pm.me>"
url="https://github.com/pacstall/pacstall/archive/refs/tags/${pkgver}.zip"prepare() {
sudo mkdir -p "${pkgdir}/usr/bin/"
sudo mkdir -p "${pkgdir}/usr/share/pacstall/scripts/"
sudo mkdir -p "${pkgdir}/usr/share/pacstall/repo/"
sudo mkdir -p "${pkgdir}/usr/share/man/man8/"
sudo mkdir -p "${pkgdir}/var/log/pacstall/error_log/"
}
package() {
sudo install -Dm 755 pacstall "${pkgdir}/usr/bin/"
sudo install -C "misc/scripts"/*"${pkgdir}/usr/share/pacstall/scripts/"
sudo install "misc/pacstall.8.gz""${pkgdir}/usr/share/man/man8/"echo"https://raw.githubusercontent.com/pacstall/pacstall-programs/master"| sudo tee "${pkgdir}/usr/share/pacstall/repo/pacstallrepo">/dev/null
sudo chmod +x "${pkgdir}/usr/share/pacstall/scripts"/*
}
This discussion was created from the release 4.0.0 Popstar.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Pacstall v4.0.0 Popstar
This update is a major update focusing on quality of life features and enhanced functionality. Users can update from Pacstall 3.14.0 or higher with
pacstall -U pacstall:master
, or reinstall using the deb file.Users
Features
-L
printing by @Elsie19 (feat(-L): add fancy listing #932, refactor(pacstall): inlinesize_of_deb
#938, fix(-L): hide no install error on non-interactive #943)Developers, Developers, Developers...
BREAKING CHANGES
pkgrel
variableFeatures
-Qi
by @Elsie19 (feat(-Qi): add queries #934, perf(-Qi): use name references instead of subshells #937)url
if-B
is used on-deb
package by @Elsie19 (feat(-B): download deb if is deb package #935)Fixes
PACSTALL_PAYLOAD
on pacdeps by @Elsie19 (fix(PACSTALL_PAYLOAD): skip if pacdep #881)declare -p
to logpacdeps
instead of raw array by @Elsie19 (fix(log): usedeclare
to avoid possible string splitting #939)LOGDIR
intoLOGDIR
andMETADIR
by @Elsie19 (fix(logdir): splitLOGDIR
intoLOGDIR
andMETADIR
#940)arch
by @oklopfer (fix(pacstall): addFARCH
array #942)check_url
instead of appending possibly wrong text by @Elsie19 (fix(check_url): use fullname instead of appending/packagelist
#946)preinst
if deb pacscript has it by @Elsie19 (fix(deb): run preinst if pacstall has it #947)Performance changes
$(date)
with builtinprintf
by @Elsie19 (refactor(date): replace subshell calls todate
withprintf
#933)--no-generate
flag toapt-cache
by @Elsie19 (perf(prompt_optdepends): do not regen cache on every apt-cache run #948)Style changes
ask
function calls by @oklopfer (fix(pacstall): ask punctuation #949)How to use features
PACBUILD variables
If you are a pacscript maintainer, there are a couple things you must do:
version
andpkgver()
(variable/function)description
->pkgdesc
(variable)build_depends
->makedepends
(array)postinst
->post_install
(function)preinst
->pre_install
(function)removescript
->post_remove
(function)pkgrel
(variable)For the merging of
version
andpkgver()
, you'll need to do the following steps:If you are a non-git package, rename
version
topkgver
. If you are a git package, add thepkgver
variable and thepkgver()
function. The variable should have the latest tag at the time of updating the pacscript, and thepkgver()
function should retrieve the latest shasum.So basically, if you are a non-git package, you have to change a variable name, and if you are a git package, you remove
version="$(pkgver)"
and addpkgver=<tag>
.We also are introducing the
pkgrel
variable. This can be used when you wish to trigger an update on a users computer but${pkgver}
has not been changed, such as fixing a broken build process. Unlike PKGBUILDs, this variable is optional and will default to1
if not included.👉 Click here to get a simple script to get the tag
📝 Examples
Here we have an old pacscript snippet:
To convert to 4.0.0, this pacscript should look like this:
Let's try a git pacscript now:
To convert to 4.0.0, we do this:
More informational
-L
If you run
pacstall -L
now, you'll be seeing something different than before:This will show you much more information about the package.
-Qi
can still be used to query an individual package information. If-L
detects it's being used non-interactively, it will fallback to the old style, which is much more suited for for scripting, so if you are using the output ofpacstall -L
in a script, nothing should change for you.Metadata queries in
-Qi
Previously, if you wanted the raw metadata to parse or use, you would have to source the metadata file and run what you needed on that. That's not the most effective, so now you can add a second argument to
-Qi
, which is the name of the piece of metadata you want. They follow the output of-Qi
sections, and spaces are replaced with underscores:-B
downloadingurl
on deb packagesThe
-B
flag, which is used to create but not install a deb, doesn't make much sense to use on a deb pacscript, so now,-B
on any deb package will downloadurl
instead.Pacscript for this releases Deb
This discussion was created from the release 4.0.0 Popstar.
Beta Was this translation helpful? Give feedback.
All reactions