You are not logged in.

#1 2018-08-05 16:50:14

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

[Solved] How to easily identify installed AUR GIT packages

Many packages have a GIT variant available over the normal "current" build version, that when built is updated to the current GIT source. Is there a way to easily search for your GIT AUR packages to manually update them? Something like Pamac is very good for automatic update notifications, but it obviously won't update a GIT package unless the package itself has been updated.  As far as I know there is also no way to quickly identify installed GIT variants within Pamac. There is a way to easily filter all installed AUR packages, but not GIT ones specifically. One example is the package "elementary-xfce-icons-git", where using the git package gives you the current build as opposed to "elementary-xfce-icons" which is actually an older version even though the version numbers on the AUR page show differently. I have many GIT version themes installed and unless I specifically remember to rebuild them, there is no way to know if the source has been updated.

Last edited by Annoyingduck (2018-08-05 17:19:16)

Offline

#2 2018-08-05 17:11:22

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

Re: [Solved] How to easily identify installed AUR GIT packages

Annoyingduck wrote:

As far as I know there is also no way to quickly identify installed GIT variants within Pamac.

pacman -Qm | grep '\-git'
Annoyingduck wrote:

... there is no way to know if the source has been updated.

But that's an entirely different question.  The only way to know if there have been upstream updates is to check upstream, or to run makepkg at least through the pkgver function (e.g., `makepkg -o`) to check the new version number.


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

Offline

#3 2018-08-05 17:18:51

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] How to easily identify installed AUR GIT packages

Trilby wrote:
Annoyingduck wrote:

As far as I know there is also no way to quickly identify installed GIT variants within Pamac.

pacman -Qm | grep '\-git'
Annoyingduck wrote:

... there is no way to know if the source has been updated.

But that's an entirely different question.  The only way to know if there have been upstream updates is to check upstream, or to run makepkg at least through the pkgver function (e.g., `makepkg -o`) to check the new version number.

The Pacman command you listed is perfect. Just what I was looking for. Marking the thread as solved, I don't think you can get a better answer than that.  Thanks.

Offline

#4 2018-08-05 17:20:05

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

Re: [Solved] How to easily identify installed AUR GIT packages

Actually it can be better:

pacman -Qsq '\-git$'

Given the safe assumption that repo packages don't end in -git.

Last edited by Trilby (2018-08-05 17:20:20)


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

Offline

#5 2018-08-05 17:23:12

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] How to easily identify installed AUR GIT packages

Trilby wrote:

Actually it can be better:

pacman -Qsq '\-git$'

Given the safe assumption that repo packages don't end in -git.

What's the difference there?  What does the $ do in pacman?

Offline

#6 2018-08-05 17:36:57

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,869
Website

Re: [Solved] How to easily identify installed AUR GIT packages

Pacman supports regular expressions in searches, the '$' denotes an end of line.

Your grep would match such packages as "vim-gitgutter", "haskell-gitrev", "python2-gitpython", etc., whereas with the '$', only packages whose names END with '-git' would be matched.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2018-08-05 17:49:30

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

Re: [Solved] How to easily identify installed AUR GIT packages

The '$' should have been in the original grep as well.  But the difference between piping to grep versus just searching with pacman ... well, one pipes to grep and the other searches with just pacman!

The only potential downside of just using pacman is that you cant combine the 'm' and 's' flags - but that's why I mentioned the assumption that no packages in the repos and with '-git'.  However, it turns out that this assumption was wrong:

$ pacman -Ss '\-git$'
community/python-setuptools-git 1.2-1
    Setuptools revision control system plugin for Git
community/python2-setuptools-git 1.2-1
    Setuptools revision control system plugin for Git

So live with the false positives of those two packages if you ever have them installed, or use the -Qm to grep pipeline.


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

Offline

#8 2018-08-05 20:45:03

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] How to easily identify installed AUR GIT packages

Nice, thanks for the further explanations. All good info here to play around with.  Thanks again all...

Offline

#9 2018-08-06 08:09:26

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

Re: [Solved] How to easily identify installed AUR GIT packages

Remember that it not just *-git packages that are pulled directly from a VCS, you may want to check for *-{cvs,svn,hg,darcs,bzr} as well.


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

Board footer

Powered by FluxBB