You are not logged in.

#1 2021-10-28 00:42:11

zacstewart
Member
Registered: 2021-10-27
Posts: 5
Website

Install packages --asdeps of a 'virtual' root packge for easy removal

Is it possible to specify a 'virtual' dependent package and install packages --asdeps for it instead of installing a package as explicit? A lot of times I need to install a bunch of packages to work on a specific project. When the project is done, I'd like to remove those packages if they haven't become an explicit install, or installed as a dependency of something else in the meantime.

pacman -S gstreamer libav --asdeps --dependent my-project
pacman -Rs my-project
# gstreamer and libav are removed

pacman -S gstreamer libav --asdeps --dependent my-project
pacman -S something-that-deps-on-libav
pacman -Rs my-project
# gstreamer is removed, libav remains installed

In my head, explicit installs are like dependencies to the root package of my-snowflake-machine. It would be cool to be useful to be able to attach a node to that root to own packages that I'll want to remove as a group later. I'm guessing that I could rig something up like this with makepkg, but I can't be the first person to have thought of doing this.

Offline

#2 2021-10-28 00:45:49

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: Install packages --asdeps of a 'virtual' root packge for easy removal

Offline

#3 2021-10-28 16:28:36

ayekat
Member
Registered: 2011-01-17
Posts: 1,632

Re: Install packages --asdeps of a 'virtual' root packge for easy removal

There's also (yes, shameless plug) metapkg/makemetapkg for declaring meta-packages in a PKGBUILD-like way (but a little more compact).

Here's an example file for what I used at the university for courses/projects: https://gitlab.com/ayekat/PKGBUILDs/-/b … TAPKGBUILD
And here's what I currently use to hold in all my packages on my systems (might look a little insane to some...): https://gitlab.com/ayekat/PKGBUILDs/-/b … TAPKGBUILD


pkgshackscfgblag

Offline

Board footer

Powered by FluxBB