You are not logged in.

#1 2015-10-08 03:19:15

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

[SOLVED] Automatically update AUR dependencies before package?

I'd like to update an installed package with either yaourt or pacaur, but I want its dependency tree updated first.  How can I accomplish this?  For example,  I'd like to update papirus which has these dependencies (all have newer versions):

$ pactree -d1 papirus
papirus
├─papirus-plasma-theme
├─papirus-icon-theme
├─papirus-color-scheme
└─papirus-gtk-theme

Yaourt says the dependecies are already installed and installs papirus only.  Pacaur does not mention the dependencies and aslo installs papirus.  I'm sure I'm missing some simple flags, but all the ones I have tried do not give me the desired result.  Is there a simple way to do this?

Last edited by zamzing (2015-10-13 03:14:26)

Offline

#2 2015-10-08 07:27:56

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [SOLVED] Automatically update AUR dependencies before package?

Try the --foreign flag of pacaur. All dependencies that aren't in the binary repositories (but available in AUR) will be rebuilt.

Edit: I assume you know what you are doing here, there are very few cases where using this flag is relevant. If the dependencies version numbers have been correctly bumped, you simply need to update with "pacaur -Sua".

Last edited by Spyhawk (2015-10-08 07:43:07)

Offline

#3 2015-10-08 10:30:27

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

Thank you, Spyhawk. The command that finally worked for me  is

pacaur -y papirus --foreign --needed

But I don't know if that also looks at the sync database for dependencies.  "pacaur -Sua papirus" would not limit its scope to just the papirus package, but wanted to also update other unrelated items.

I did not find a way to do this with yaourt.

Offline

#4 2015-10-08 10:40:17

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [SOLVED] Automatically update AUR dependencies before package?

zamzing wrote:

But I don't know if that also looks at the sync database for dependencies.

It does.

Note that partial upgrade is unsupported, so it's usually not a good idea to do so, unless you know what you are doing.
Yaourt doesn't implement this feature, so you'd need to pass the package and all its dependencies explicitly if you want to rebuild these.

Offline

#5 2015-10-08 11:00:15

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

Re: [SOLVED] Automatically update AUR dependencies before package?

Spyhawk wrote:

Note that partial upgrade is unsupported, so it's usually not a good idea to do so

Unless I misread, this really wouldn't fall into that category.  Updating that main repo sync database without updating main repo packages could lead to problems.  But as long as one updates all main repo packages, it's really up to them whether they also update all AUR packages at the same time.

Personally I rarely update my aur packages.  This could never break important core packages (unless of course one uses an aur version as a replacement for a main repo package).  The worst that could happen is that an AUR package could break and need to be rebuilt.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2015-10-08 11:11:55

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [SOLVED] Automatically update AUR dependencies before package?

Trilby wrote:

This could never break important core packages (unless of course one uses an aur version as a replacement for a main repo package).  The worst that could happen is that an AUR package could break and need to be rebuilt.

Yes, I was thinking about other AUR packages breaking if they rely on binary packages that got updated. The main core system will be up to date, so any breakage that might happen would be minor only.

Offline

#7 2015-10-10 09:04:29

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

Spyhawk wrote:

Note that partial upgrade is unsupported, so it's usually not a good idea to do so, unless you know what you are doing.

Like Trilby, I update my AUR packages only when I need to, usually soon after updating the rest of the system.  It would be great to have a pacaur flag to only update all explicitly installed AUR apps and their dependencies.  For now I use a scripted two step process: a) Find all explicitly installed AUR apps, and b) Feed the list to the install command above.

BTW, thanks for pacaur!

Offline

#8 2015-10-10 10:34:34

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [SOLVED] Automatically update AUR dependencies before package?

zamzing wrote:

It would be great to have a pacaur flag to only update all explicitly installed AUR apps and their dependencies.

Could you expand here? In which situation would this flag be useful?

Offline

#9 2015-10-10 12:06:09

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

Re: [SOLVED] Automatically update AUR dependencies before package?

zamzing wrote:

It would be great to have a pacaur flag to only update all explicitly installed AUR apps and their dependencies.

So in otherwords, all your aur packages.  These can be listed with `pacman -Qqm`.*

How would you have an aur package installed if it were neither explicitly installed nor installed as a dependency of one that was?

*note: there would be some rare exceptions where -Qqm gives packages that are not in the AUR but were dropped from the main repos.  Their is a pretty good chance that you'd want to remove these anyhow - so provided you are maintaining your system and cleaning things up periodically, -Qqm would give the list you want.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2015-10-12 17:38:38

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

Spyhawk wrote:

Could you expand here? In which situation would this flag be useful?

Well, it would be like "pacaur -Sua", but it would look at AUR packages only, not the whole system.  I could then update all AUR packages only at anytime and know that their dependencies will be installed first an in the right order.  Perhaps you already have a way of doing this... I just haven't found it.

Offline

#11 2015-10-12 17:46:19

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Automatically update AUR dependencies before package?

You're still not explaining it well. If the package is already installed, the deps are already installed and current unless you refresh your sync database. If you do that first, then you're talking partial upgrade.

How about this: can you give us a concrete example, including package names, of exactly what you want to do?

Last edited by Scimmia (2015-10-12 17:48:53)

Offline

#12 2015-10-12 17:55:08

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

Trilby wrote:

So in otherwords, all your aur packages.  These can be listed with `pacman -Qqm`.*

You are right, Trilby. I want to update AUR packages independently. But "pacman -Qqm" gives me a list of all foreign packages, not just AUR. And it doesn't differentiate what is explicitly installed or not.  I want a list of explicitly installed AUR packages so that I can update them and their dependencies correctly with a command similar to the pacaur one discussed above.  I have not found an easy way to that currently, but pacaur is  tantalizingly close!

Offline

#13 2015-10-12 17:59:10

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

Re: [SOLVED] Automatically update AUR dependencies before package?

zamzing wrote:

And it doesn't differentiate what is explicitly installed or not.

So?  AUR packages cannot be dependencies for main repo packages.  So every single AUR package you have installed is either a dependency for another AUR package that you explicitly installed, or it is itself explicitly installed.  While one might try to use different words to define these two sets (explicit AUR + deps vs all AUR) they will be exactly the same set of packages.

So unless you are hoping to also update main repo dependencies simply updating all AUR packages would do what you are looking for.  If you also want to update main repo packages, then you must update all main repo packages, or you will be doing a partial upgrade as indicated by Scimmia.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#14 2015-10-12 18:04:43

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

Scimmia wrote:

If the package is already installed, the deps are already installed and current unless you refresh your sync database. If you do that first, then you're talking partial upgrade.

Yes, I am talking about partial upgrade, but of AUR packages only.  The core system is always fully upgraded properly; I find that AUR needs extra scrutiny and if all packages are up to par, I might want to upgrade them all, or some, or just one like I said in the first post.  Don't know how else to explain it.

Offline

#15 2015-10-12 18:10:06

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Automatically update AUR dependencies before package?

So what you're looking for is simply something to order the build of AUR packages? I think I remember a couple of discussions about that around here previously.

Offline

#16 2015-10-12 18:13:46

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: [SOLVED] Automatically update AUR dependencies before package?

If you take care during the installation of AUR packages to use the --asdeps option, you can use "pacman -Qme" to display explicit packages. pacaur does not automate that.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#17 2015-10-12 18:19:56

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

Trilby wrote:

So unless you are hoping to also update main repo dependencies simply updating all AUR packages would do what you are looking for.  If you also want to update main repo packages, then you must update all main repo packages, or you will be doing a partial upgrade as indicated by Scimmia.

The problem I've had with updating all AUR packages with some AUR helpers is that the upgrades are sometimes done out of order.  The dependencies can be upgraded after the main package and thus features may be excluded because they weren't available when building said package.  I experienced such problems when upgrading tools for manipulating iphones and ipods.

Offline

#18 2015-10-12 18:22:45

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

Scimmia wrote:

So what you're looking for is simply something to order the build of AUR packages?

That's it.  I just wondered if pacaur had a simple way of doing it so I can abandon my hack.  Can you point me to that discussion?

Offline

#19 2015-10-12 18:28:41

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

progandy wrote:

If you take care during the installation of AUR packages to use the --asdeps option, you can use "pacman -Qme" to display explicit packages.

That's what I use now as part of my hack, but it also gives you packages that are no longer in the AUR.

Offline

#20 2015-10-12 23:52:30

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [SOLVED] Automatically update AUR dependencies before package?

zamzing wrote:

Well, it would be like "pacaur -Sua", but it would look at AUR packages only, not the whole system.  I could then update all AUR packages only at anytime and know that their dependencies will be installed first an in the right order.  Perhaps you already have a way of doing this... I just haven't found it.

This sentence doesn't make sense. "-Sua" looks at AUR packages only already... But if you want to rebuild all AUR packages in the right order (even though that is overkill), simply pass your AUR packages list explicitly to pacaur:

pacaur -S $(pacman -Qmq)

As a sidenote, the --devel flag also reorders the dependencies when rebuilding VCS packages.

Last edited by Spyhawk (2015-10-13 00:07:47)

Offline

#21 2015-10-13 03:10:57

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

Spyhawk wrote:

"-Sua" looks at AUR packages only already...

Oh. I did not realize this and thought "-Sua" updated the whole system _including_ the AUR.  Since I always update the base system fully first before messing with any AUR packages, I had not seen -- until now; just did a test -- that "-Sua" only updates base packages if they are needed by an AUR update.  Wonderful!

I'll mark this query solved. Thank you all for your help.

Offline

#22 2015-10-13 11:13:11

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

Re: [SOLVED] Automatically update AUR dependencies before package?

zamzing wrote:

... I always update the base system fully first before messing with any AUR packages...  "-Sua" only updates base packages if they are needed by an AUR update.

This sounds troubling.  How/why would -Sua then ever update a main repo package?  If main repo packages have all just been updated as you indicate, there'd be none left to update.  If your aur update requires an update to and main repo packages, then by-definitition this is a partial upgrade and a bad idea.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#23 2015-10-13 12:45:48

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [SOLVED] Automatically update AUR dependencies before package?

Trilby wrote:

How/why would -Sua then ever update a main repo package?  If main repo packages have all just been updated as you indicate, there'd be none left to update.  If your aur update requires an update to and main repo packages, then by-definitition this is a partial upgrade and a bad idea.

This can happen when the new version of an AUR package requires an additional dependency that can be found in the repository only. This seldom occurs, but this is indeed possible.
Edit: Ah, I missed the "upgrade" part. I guess this is simply a misformulation from zamzing. I cannot imagine how a repository package would be "upgraded" by using -Sua after a full binary packages update.

Last edited by Spyhawk (2015-10-13 12:53:48)

Offline

#24 2015-10-14 10:14:21

zamzing
Member
From: Washington, DC
Registered: 2015-10-08
Posts: 24

Re: [SOLVED] Automatically update AUR dependencies before package?

Spyhawk wrote:

I guess this is simply a misformulation from zamzing.

No misinformation; it was a test. The test I did was to refresh the repos then do a "pacaur -Sua" just to see if it will only update AUR packages and any dependencies, including main packages. It worked as you said.  I had not seen this before because I always update main packages first so any AUR dependencies from there are always already updated.  Have no worries about partial upgrades.

Offline

Board footer

Powered by FluxBB