You are not logged in.

#1 2018-11-13 12:06:18

huzo11
Member
Registered: 2018-10-31
Posts: 60

Automating makepkg and pacman -U

Hello all.

So I was trying to write a simple python script to automate installing dependencies of AUR packages. However, I got confused when I got into the step of downloading the package files and installing them. The part involving creating package files is straightforward. But there is a slight problem when I want to automate the "sudo pacman -U packagename" part. I do not know the full name of the file that was formed by makepkg. What would be an easy way to get the package file's exact name? 

Thanks.


Be nice and live for others.
https://prismatically.blog

Offline

#2 2018-11-13 12:12:07

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Automating makepkg and pacman -U

Try "makepkg --packagelist".   Or just do a "makepkg -i" to install them after build.

Offline

#3 2018-11-13 12:13:27

huzo11
Member
Registered: 2018-10-31
Posts: 60

Re: Automating makepkg and pacman -U

Allan wrote:

Try "makepkg --packagelist".   Or just do a "makepkg -i" to install them after build.

This is great! Thanks.


Be nice and live for others.
https://prismatically.blog

Offline

#4 2018-11-13 14:24:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Automating makepkg and pacman -U

Remember the --asdeps flag if you use `makepkg -i` (well, remember it with pacman -U too, but it's easier to forget with makepkg).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2018-11-13 14:55:18

huzo11
Member
Registered: 2018-10-31
Posts: 60

Re: Automating makepkg and pacman -U

Trilby wrote:

Remember the --asdeps flag if you use `makepkg -i` (well, remember it with pacman -U too, but it's easier to forget with makepkg).

According to the official website:

--asdeps <package>
Mark a package as non-explicitly installed; in other words, set their install reason to be installed as a dependency.

That is interesting. What would be different if you do not install it as a dependency? As a guess, would it only act as a dependency and not be accessible directly by the user?


Be nice and live for others.
https://prismatically.blog

Offline

#6 2018-11-13 15:11:13

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Automating makepkg and pacman -U

It would mean when removing a package with -Rns, you would not remove the no-longer-needed dependency, because pacman thinks you explicitly want that package.

It would mean if you use pacman -Qe to list explicitly installed packages, or pacman -Qqdt to list unneeded packages which are orphaned, you wouldn't be able to distinguish between this package and packages you actually care about.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB