You are not logged in.

#1 2015-12-27 09:29:19

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

[SOLVED] AUR wrapper that checks /var/local/pacman/pkg (or pkg-local)?

This is pretty simple, but it's either too tough for me to Google for or hasn't been asked yet on any site Google caches. Y'know how yaourtrc has that option to cache AUR packages in your package cache (EXPORT=2) or in a directory of your choosing (EXPORT=1)? I want to take that to the next level and have yaourt ALSO check that cache for existing AUR packages before immediately downloading and building them all over again. I want that for 2 reasons:

-On those rare ocassions I have to reinstall Arch, I do it with a copy of my package cache and lists of explicitly and dependently installed packages. Currently, because yaourt isn't smart enough to notice the built packages from the AUR, the only automated way to install everything in my personal install script is to use pacman -U and manually trudge through every inexplicable duplicate conflict (even though I make sure I don't have any duplicates in there, life finds a way). If yaourt could search the cache, it would be as simple as copying all those package files to the cache and running yaourt -S on the text file of explicitly installed packages. That would be amazing.
-I have a virtual machine that's another installation of Arch, only optimized for gaming (long story). It has a LOT of overlap with my host Arch's packages, so I have it mount the host's package cache as its own. Upgrading both systems on my own would be so much easier if I didn't have to manually tell pacman -U, hey, here's all those AUR package files that were already built on the host.

I'd prefer to avoid leaving yaourt, but if you know of an AUR wrapper that A) works great, B) has what I'm looking for with these cache options, and C) really can replace pacman like yaourt can, I'm all ears.

And if yaourt already HAS that feature, well, that would explain why Googling got me nowhere. If it already has that feature, help me figure out why it never has for me on my computers.

Last edited by Cadeyrn (2015-12-27 19:31:22)

Offline

#2 2015-12-27 15:34:50

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [SOLVED] AUR wrapper that checks /var/local/pacman/pkg (or pkg-local)?

I got curious in this issue since cache handling is what I'd consider a basic feature for an helper. And indeed, even with the EXPORT variable set yaourt doesn't provide this ability...

I'm particularly biased here, but I'd suggest to try pacaur instead, which fits your A, B and C requirements. As it is designed quite differently than yaourt, ensure to read this link to see you belong to the user target, as well as the man page for configuration options. The bottom line is that pacaur is less featureful/bloated than yaourt by design, but it works better in most day-to-day usercases.

Offline

#3 2015-12-27 19:10:18

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: [SOLVED] AUR wrapper that checks /var/local/pacman/pkg (or pkg-local)?

If pacaur does it, then great. I could just use both. Yaourt for when I need its extra features and pacaur for when I'm upgrading or reinstalling my system.

EDIT: To anyone reading this thread after the fact, it wasn't immediately obvious to me when I read the docs that you get those cache features out of pacaur by setting $PKGDEST yourself. So, I'm noting that.

Last edited by Cadeyrn (2015-12-27 19:31:06)

Offline

#4 2015-12-30 05:19:51

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

Re: [SOLVED] AUR wrapper that checks /var/local/pacman/pkg (or pkg-local)?

Personally I have an extra

CacheDir = /var/cache/pacman/custom

and yaourt saves packages there.

Then I use a custom local repository located there -- and yaourt is aliased to a config file which doesn't include that repo. (Actually, my "main" pacman.conf is Included in /etc/pacman.conf which has the [custom] repo definition.)

`sudo pacman -Syu` draws from the local repo, but yaourt still searches the AUR for new and updated AUR packages.


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

Offline

#5 2015-12-30 05:51:09

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: [SOLVED] AUR wrapper that checks /var/local/pacman/pkg (or pkg-local)?

^That's also a great way to do it. For me, slightly less easy to setup than having pacaur be used along with yaourt in my upgrade and install scripts.

Offline

#6 2015-12-30 16:58:43

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

Re: [SOLVED] AUR wrapper that checks /var/local/pacman/pkg (or pkg-local)?

Well, I am using a couple pacman.conf's anyway. I have one to temporarily enable testing. So what's one more?
I don't generally find myself in need of reinstalling things anyway. Switching AUR wrappers when I have always been perfectly happy with yaourt , just for that, seems odd.

...

Did you say you intend on using both pacaur and yaourt? Why?


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

Offline

#7 2015-12-30 18:00:14

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [SOLVED] AUR wrapper that checks /var/local/pacman/pkg (or pkg-local)?

Eschwartz wrote:

Did you say you intend on using both pacaur and yaourt? Why?

Yaourt has a few features that pacaur doesn't have, and these might be an absolute requirement for some users. From the top of my mind, the most prominent are interactive search, comments viewing, and customizepkg support. On the other hand, pacaur has speed and better split package support.

Offline

#8 2015-12-30 18:10:24

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: [SOLVED] AUR wrapper that checks /var/local/pacman/pkg (or pkg-local)?

Yaourt also lets me automatically use sudo to store packages in the cache so I don't have to give myself write access, and can automatically store packages in the cache without me having to set a variable, making it easier for installing new packages and upgrades. Pacaur, meanwhile, is capable of searching the cache you set for AUR packages, making it easier for upgrading a cache-sharing VM and installing a new system from a saved cache in my home folder (2 things I do). I honestly don't understand why both don't have both of these seemingly obvious and easy features. Since pacaur is supposed to not run as root and asks for sudo at the right times, and even has an option to circumvent the sudo timeout (wonderful!), you'd think it would complete its sudo featureset by including package caching in the whole deal. Since yaourt can cache packages from the AUR, you'd think it would also check that cache for AUR packages. But, I'm happy using both to complement each other.

Last edited by Cadeyrn (2015-12-30 18:11:47)

Offline

#9 2015-12-30 18:27:57

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [SOLVED] AUR wrapper that checks /var/local/pacman/pkg (or pkg-local)?

Cadeyrn wrote:

I honestly don't understand why both don't have both of these seemingly obvious and easy features. Since pacaur is supposed to not run as root and asks for sudo at the right times, and even has an option to circumvent the sudo timeout (wonderful!), you'd think it would complete its sudo featureset by including package caching in the whole deal.

Oh, that's an easy explanation. Pacaur simply relies on makepkg for cache instead of duplicating the work by itself, as yaourt does. This is the reason you set the existing $PKGDEST in makepkg.conf instead of using another variable. However, makepkg cannot copy built packages into PKGDEST if it hasn't the write permission. The workaround is easy: use another directory than /var/cache/pacman/pkgs with write permission for your user, or add write permission for your user to  /var/cache/pacman/pkgs.

Both pacaur and yaourt use a different design, so what is obvious in one helper might not be feasible easily in the other (f.e. adding correct customizpkg in pacaur is very hard, while yaourt will likely never have proper support for split packages).

Offline

Board footer

Powered by FluxBB