You are not logged in.

#1 2013-05-12 14:44:27

kabads
Member
Registered: 2012-09-22
Posts: 271
Website

[Solved] Checking which packages will update pacman -Syu --dry-run?

Is it possible to run pacman -Syu (with different flags) and see which packages will update without having to go through it? I've looked at man pacman and didn't see anything obvious.

TIA.

Last edited by kabads (2013-05-13 03:22:25)

Offline

#2 2013-05-12 14:48:50

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

When you use -S or -R, pacman tells you what it would do and asks whether you want to proceed. You can use VerbosePkgLists and TotalDownload in pacman.conf for more info.

Offline

#3 2013-05-12 14:57:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

Use 'checkupdates'.

Offline

#4 2013-05-12 17:20:50

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

@ karol, what is checkupdates?

Offline

#5 2013-05-12 17:23:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

'checkupdates -h'.

Offline

#6 2013-05-12 17:40:36

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

Woah, when did it make into pacman? 4.1.1, I suppose.

I thought it was an option in pacman.conf, but since I had already merged the pacnew, I was not so sure.

Edit: Err.. I meant pacman 4.1.0

Last edited by x33a (2013-05-12 17:49:30)

Offline

#7 2013-05-12 17:43:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

It was introduces in pacman 4.1.0:  https://projects.archlinux.org/pacman.git/tree/NEWS#n84 based on keenerd's checkupdates https://bbs.archlinux.org/viewtopic.php … 5#p1072495

$ pkgfile -v checkupdates
core/pacman 4.1.0-2	/usr/bin/checkupdates
$ less /usr/bin/checkupdates

Offline

#8 2013-05-12 17:45:24

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

I just run "pacman -Syu" and choose no to accept the updates.  Perhaps a little more risky than other methods (if you hit the wrong key).

Offline

#9 2013-05-12 17:51:15

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

Thanks for the info karol, just tried it and it looks good. A verbose switch to show the db download progress would be great, but that should be reported to keenerd wink

Last edited by x33a (2013-05-12 17:51:49)

Offline

#10 2013-05-12 18:00:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

David Batson wrote:

I just run "pacman -Syu" and choose no to accept the updates.  Perhaps a little more risky than other methods (if you hit the wrong key).

This is the same as running pacman -Sy $package and can cause issues. Use checkupdates, that is what it is there for...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2013-05-12 18:06:47

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

Hey Jason,
I don't think he meant to ignore the messages where you replace one package with another.  I think he meant when it finally gives you the long list of what is going to be updated, decline everything and abort.
Eric


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#12 2013-05-12 18:09:19

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

ewaller wrote:

Hey Jason,
I don't think he meant to ignore the messages where you replace one package with another.  I think he meant when it finally gives you the long list of what is going to be updated, decline everything and abort.
Eric

Which is the same as running 'pacman -Sy' + 'pacman -Qu' and is Considered Harmful™.

Offline

#13 2013-05-12 18:15:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

Wow, I am missing something.  I clearly have some research to do. 

What I would expect is that first, the cache is updated.  Then dependencies resolved, and then a list of files is presented that will be changed if you press 'y' or return.  I would think that pressing 'N' would cause Pacman to terminate without updating anything except the cache.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#14 2013-05-12 18:34:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

ewaller wrote:

Wow, I am missing something.  I clearly have some research to do. 

What I would expect is that first, the cache is updated.  Then dependencies resolved, and then a list of files is presented that will be changed if you press 'y' or return.  I would think that pressing 'N' would cause Pacman to terminate without updating anything except the cache.

Updating sync dbs and installing some packages 'pacman -Sy foo' may result in a broken system. 'pacman -Sy'  or 'pacman -Syu' + answering 'n' to the question is not a problem but may lead to problems, so it's best to avoid it.

Offline

#15 2013-05-12 18:42:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

karol wrote:

Updating sync dbs and installing some packages 'pacman -Sy foo' may result in a broken system.

That is an absolute truth and cannot be overemphasised

'pacman -Sy'  or 'pacman -Syu' + answering 'n' to the question is not a problem but may lead to problems, so it's best to avoid it.

But this seems to contradict what Jason and Falconindy are saying.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#16 2013-05-12 18:49:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

Just as '-f' was removed to discourage people from using 'pacman -Syuf', it's easier to say that 'pacman -Sy' is bad, even thought the problem is 'pacman -Sy foo' i.e. 'pacman -Sy' + 'pacman -S foo'.

Offline

#17 2013-05-12 18:54:15

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

I was having difficulty understanding why using pacman -Syu and then aborting would be a problem.  After searching a little, I found the following thread from a couple of years ago that explains it well.

https://bbs.archlinux.org/viewtopic.php?id=89328

AFAICT, the problem only surfaces if you run pacman -Syu, abort, then later try to install individual packages without updating your system first.

Offline

#18 2013-05-12 18:57:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

David Batson wrote:

I was having difficulty understanding why using pacman -Syu and then aborting would be a problem.  After searching a little, I found the following thread from a couple of years ago that explains it well.

https://bbs.archlinux.org/viewtopic.php?id=89328

AFAICT, the problem only surfaces if you run pacman -Syu, abort, then later try to install individual packages without updating your system first.

Not exactly, as I posted above, running 'pacman -Sy' is bad too.

Offline

#19 2013-05-12 19:00:37

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

Okay that makes sense.  Any time one updates the cache, but leaves older version of programs installed, the next time someone goes to install a new package there exists the possibility of generating a 'partial update' situation.  But should that not be caught during the resolution of dependencies?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#20 2013-05-12 19:16:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

If the applications you have installed don't have e.g. libpng as a versioned dependency, doing 'pacman -Sy foo' might pull the new version of the library, which will bread everything but 'foo'.

Offline

#21 2013-05-12 21:12:45

kabads
Member
Registered: 2012-09-22
Posts: 271
Website

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

Thanks guys - checkupdates is exactly what I wanted.

Offline

#22 2013-05-12 22:37:13

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,384
Website

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

ewaller wrote:

But should that not be caught during the resolution of dependencies?

It could, but Arch does not support doing that. We do not use exact versions in our dependencies.

Offline

#23 2013-05-12 23:16:24

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [Solved] Checking which packages will update pacman -Syu --dry-run?

Allan wrote:

It could, but Arch does not support doing that. We do not use exact versions in our dependencies.

<paradigm shift> How long have I been here, and how is it that has not ever occurred to me before? <That was meant to be a rhetorical question>
Thanks Allan.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB