You are not logged in.

#1 2017-11-29 21:08:14

Batou
Member
Registered: 2017-01-03
Posts: 259

[Request] Post-transaction hook for voting after installing AUR packag

Hi all,

After noticing that many packages get pruned if they don't have any votes, I've started voting on every package that I install. I use aurvote for that.

Does anyone know how to write a post-transaction hook that would just invoke aurote after installing something with pacaur? I know some PKGBUILDs have aurvote function in them but most don't. I'd like to completely automate voting.

Thanks!


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#2 2017-11-29 23:11:16

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Request] Post-transaction hook for voting after installing AUR packag

How about...

[Trigger]
Operation = Install
Type = Package
Target = *

[Action]
Description = Vote for package...
When = PostTransaction
Exec = /usr/bin/aurvote -v %P

This will vote for every package you install. I don't use aurvote so I'm assuming it will handle a list of AUR and repo packages without falling over.

Last edited by Slithery (2017-11-29 23:13:53)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-11-29 23:22:36

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

Re: [Request] Post-transaction hook for voting after installing AUR packag

Batou wrote:

After noticing that many packages get pruned if they don't have any votes...

What?

This does not happen.  Maintainers may orphan packages at any time - and perhaps some are disuaded from doing so (or encouraged to continue maintaining) by votes, but a lack of votes certainly doesn't trigger pruning.


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

Offline

#4 2017-11-30 00:22:44

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

Re: [Request] Post-transaction hook for voting after installing AUR packag

Trilby wrote:

What?

This does not happen.  Maintainers may orphan packages at any time - and perhaps some are disuaded from doing so (or encouraged to continue maintaining) by votes, but a lack of votes certainly doesn't trigger pruning.

This, exactly.

Granted, that some packages have recently been pruned for a combination of factors, including both the fact that they were orphaned and that they displayed no real sign of interest.
But a package that is orphaned, has no comments, and has no votes was likely submitted by one of those people who upload a package and immediately orphan it, and if the submitter wasn't interested in it, why should we assume anyone else is (without evidence)?

And if a package was deleted, feel free to restore it and take over maintenance.

...

That being said, yaourt can ask you after installing AUR packages, if you want to vote for them.
Or you can trivially generate a list of AUR packages with pacman -Qqn, and use that as input for aurvote (or `ssh aur@aur.archlinux.org vote <name>`).


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

Offline

#5 2017-11-30 00:37:11

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Request] Post-transaction hook for voting after installing AUR packag

Eschwartz wrote:

Or you can trivially generate a list of AUR packages with pacman -Qqn, and use that as input for aurvote (or `ssh aur@aur.archlinux.org vote <name>`).

I believe you mean pacman -Qqm smile


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2017-11-30 02:45:00

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

Re: [Request] Post-transaction hook for voting after installing AUR packag

Very probably. smile

Fortunately, you cannot prove I didn't hit the wrong key by accident (and then fail to notice because they look similar).

I can deny everything!!!


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

Offline

#7 2017-11-30 04:14:43

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: [Request] Post-transaction hook for voting after installing AUR packag

slithery wrote:

How about...

[Trigger]
Operation = Install
Type = Package
Target = *

[Action]
Description = Vote for package...
When = PostTransaction
Exec = /usr/bin/aurvote -v %P

This will vote for every package you install. I don't use aurvote so I'm assuming it will handle a list of AUR and repo packages without falling over.

Thanks!

I've run into an issue with hooks directory config. If I place aurvote.hook into /etc/pacman.d/hooks I get this error:

:: Running post-transaction hooks...
(1/2) Vote for package...
Error: /root/.config/aurvote must have user name and password. Run:
aurvote --configure
error: command failed to execute correctly
 

I guess the easy fix would be to copy aurvote conf file from ~/.config to /root/config

I did try to copy the hook to ~/.config/pacman/hooks/ and I added the path to pacman.conf as:

HookDir     = /etc/pacman.d/hooks/ /home/bato/.config/pacman/hooks/ 

But pacaur cannot find it there. I've tried ,;: as multiple path separators with no luck. Man page for pacman.conf says you should be able to specify multiple paths but they don't specify the separator.

Anyone know what it would be?

Trilby wrote:
Batou wrote:

After noticing that many packages get pruned if they don't have any votes...

What?

This does not happen.  Maintainers may orphan packages at any time - and perhaps some are disuaded from doing so (or encouraged to continue maintaining) by votes, but a lack of votes certainly doesn't trigger pruning.

I've noticed that a package is much more likely to disappear if it has no votes. Few packages I used just disappeared from AUR. I did notice, after looking at the archive.org page, that they had no votes.

I'm hoping that by voting, this won't happen again smile


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#8 2017-11-30 12:13:18

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

Re: [Request] Post-transaction hook for voting after installing AUR packag

Batou wrote:

I've noticed that a package is much more likely to disappear if it has no votes.

If a correlation does not imply causation, then a random coincidence certainly doesn't.

They would have been removed because they were orphans and most likely broken.  Certainly being broken makes it likely that they'd have few votes too, so the number of votes (if they aren't artificially inflated in the way you are trying to do) may indicate which packages are likely to be removed, but does not influence it.

So by voting for potentially bad/orphaned packages you are most definitely not making them more likely to stay in the AUR: you are just reducing the signal to noise ratio in the votes (a disservice to all really, but I could care less about votes, so it doesn't bother me).

If you want orphaned packages to remain in the AUR adopt and maintain them!


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

Offline

Board footer

Powered by FluxBB