You are not logged in.

#1 2008-11-25 09:49:12

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

pacman -Syu -> show which repo the updates are in + current versions?

Hi, I couldn't find a way (other then write shell script workarounds ;-) ) to show this additional information:
- the repository the update is in
- the current installed version of the package

dieter@dieter-ws ~ $sudo pacman -Syu
(...)
Targets (4): abiword-2.6.5-1  avahi-0.6.23-2  bashrun-0.7-1  qscintilla-2.3.2-1  
(...)

I would like to know in which repo's these updates are, and which versions I have installed locally (doing pacman -Qi for each package myself does not count).  Is that possible?


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#2 2008-11-25 23:01:34

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: pacman -Syu -> show which repo the updates are in + current versions?

I'm sure you could probably script it using -Qu, but other than that, I don't think pacman can do that.

Offline

#3 2008-11-25 23:49:30

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: pacman -Syu -> show which repo the updates are in + current versions?

I guess you could try out Yaourt.

Birger smile

Offline

#4 2008-11-26 10:48:48

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: pacman -Syu -> show which repo the updates are in + current versions?

MindTooth wrote:

I guess you could try out Yaourt.

Birger smile

You sure? I have yaourt but I don't think it can do that.. I just went over the manpage again and tried some options like -Syui, -Qui -Quv etc but couldn't find out how to do it..


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#5 2008-11-26 12:05:10

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pacman -Syu -> show which repo the updates are in + current versions?

I'll add this to pacpal as soon as I get a change (this week probably). I'm subscribing to this thread so that I don't forget.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2008-11-27 16:26:19

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pacman -Syu -> show which repo the updates are in + current versions?

I've now added a "--display-update-info" option to pacpal. It prints out the standard "pacman -Qu" info followed by a list of each package in the update queue in this form:

repo/pkg
     installed_version -> current_version

My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#7 2008-11-27 16:55:56

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: pacman -Syu -> show which repo the updates are in + current versions?

Xyne wrote:

I've now added a "--display-update-info" option to pacpal. It prints out the standard "pacman -Qu" info followed by a list of each package in the update queue in this form:

repo/pkg
     installed_version -> current_version

Thanks Xyne, that's exactly what I'm looking for.
Unfortunately it doesn't work for me: only $update_info is shown to me (eg pacman -Qu output)
I have about 14 packages to be updated, but the loop 'foreach my $pkg (@pkgs)' is not even executed once.
So something seems to go wrong at

my @pkgs = grep {$_} split /\s+/, $1 if ($update_info =~ m/\n\n.+?\(\d+\):(.*?)\n\n/m);

my perl skills are very limited, can you figure this out or do you want more info from me?

Last edited by Dieter@be (2008-11-27 16:57:08)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#8 2008-11-27 17:33:30

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pacman -Syu -> show which repo the updates are in + current versions?

Ok, I've changed that line a bit so check the latest version. If it still doesn't work, can you post the output of "pacman -Qu" so that I can figure out where the regex is failing?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#9 2008-11-27 22:33:50

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: pacman -Syu -> show which repo the updates are in + current versions?

Xyne wrote:

Ok, I've changed that line a bit so check the latest version. If it still doesn't work, can you post the output of "pacman -Qu" so that I can figure out where the regex is failing?

It's better now, however there is still a bug.  'pacman -Ss' also shows the group of a package, eg:

testing/automake 1.10.2-1 (base-devel)
testing/man-pages 3.14-1 (base)
core/automake 1.10.1-2 (base-devel)
core/man-pages 3.13-1 (base)
extra/abiword 2.6.5-1

You do this:

my ($repo) = ($sync_db =~ m/^(.+)\/\Q$name $ver\E$/m);

This only works if there is no group (eg abiword). It doesn't match for the others.  Leaving away the '$' fixes this smile

Last edited by Dieter@be (2008-11-27 22:34:26)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#10 2008-11-27 23:35:38

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pacman -Syu -> show which repo the updates are in + current versions?

Ah, I'd forgotten about the group being listed. I might add that to the display info later, but for now I've changed it to make it work as originally intended.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB