Yay timing out

I have a few -git aur packages that take quite a while to build.

As a result it’s not feasible to watch them like a hawk while they’re building and I often miss the opportunity to sudo at the end of the install.

Is there any workaround for this?

How long does it take ?, it is normal that when compiling packages it takes time.

It also depends on the capacity of your hardware.

For big bad AUR packages?

yay -G name-of-package
cd name-of-package
makepkg -si

A little annoying but at least, it will work a little better.

1 Like

rpcs3 and yuzu-mainline are the worst culprits, rpcs3 can 30 minutes.

( on a 1700X )

Yes, use the option --sudoloop or set it in the config file.

That stops sudo from timing out on your password while it is running.

1 Like

Emulators are what you try to install with yay, so it can take time …

That’s exactly what I was looking for :smiley:

A reasonable explanation here:

2 Likes

is not created by default anymore…
needs to be saved first:
yay --save

for some reason I had it already.

It’s working great now, though I’ve added chaotic-aur which should cut down a little on the amount of emulators I need to build.

Just a passing thought as I’m passing by - if you build a lot, you should have makepkg.conf set to use all cores for compiling and compressing. If not - it seems worth the change to cut the waiting!

numberofcores=$(grep -c ^processor /proc/cpuinfo)

if [ $numberofcores -gt 1 ]
then
        echo "You have " $numberofcores" cores."
        echo "Changing the makeflags for "$numberofcores" cores."
        sudo sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j'$(($numberofcores+1))'"/g' /etc/makepkg.conf;
        echo "Changing the compression settings for "$numberofcores" cores."
        sudo sed -i 's/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T '"$numberofcores"' -z -)/g' /etc/makepkg.conf
else
        echo "No change."
fi

Apologies if you knew this and dealt with it already - but I only noticed because I have a conky running with CPU use graphs. Picked this up on ‘another distro’…

3 Likes

You can also use nproc to get the num of processors :slight_smile:

1 Like

Glad to learn that - now if only I could retain it! I found that script elsewhere, and it works, so I went with it. I keep a bunch of such things as “aides memoires”, and occasionally they’re useful to others too - without regard to MY expertise.

Posted in hopes that someone might come across it who could use it - what with the thread title :grin:

1 Like

At this point, you might consider switching over to zstd compression instead of using xz. It is substantially faster.

I’ll use it, thank you for posting :slight_smile: Even though sometimes PKBUILDs can override the flags as far as I know.

As to nproc it’s just a bit less typing :smile:

That makes sense - but I thought that choice was made elsewhere? Guess I have more stuff to look up! :grin:

It is made in the same file in the PACKAGE DEFAULTS section by changing the line that beings with PKGEXT like this:

PKGEXT='.pkg.tar.zst'

If you have a makepkg.conf that doesn’t include the zstd compression line also add that as well with the rest of the compression settings.

Here is what I use:

COMPRESSZST=(zstd -c -z -q - --threads=0)
3 Likes

Mine was under EXTENSION DEFAULTS, but I’ve made the change. Now - what do I need to try it out on? :grin: Maybe I should check out Vivaldi again… or an Amiga emulator (I certainly have enough software for it! - If I could remember how to get it moved over to something Linux can read)

2 Likes

vivaldi is actually a good way to test because most of the install time for it is when it is compressing since it is a binary.