You are not logged in.
Hello!
I have been doing this for a while, to install a
recently added package, or upgrade a single package
without upgrading the entire system:
(Disclaimer: don't do this, unless you really know what you are doing)
# pacman -Sy foo, or equivalently:
# pacman -Sy
# pacman -S fooI have only recently realized why this does not really
work on arch: 'foo' may share a dependency 'bar' with
another package 'goo' on the system. 'bar' gets
upgraded, and 'goo' stops working, because it was built
against the older version of 'bar'.
But pacman knows this, in theory. It knows about
dependencies both forwards and backwards. Couldn't
pacman -Sy be handled like so:
# pacman -Sy
# pacman -S foo
...
Warning: Partial system upgrade detected.
foo has the following shared dependencies [EDIT] that also have upgrades available:
[bar]: Required By goo pkga pkgb pkgc pkgd pkge <-- These may have reverse dependencies of their own.
[rab]: Required By pkgf pkgg pkgh pkgi
...
Do you want to upgrade the whole dependency chain
(recommended)? y/n
y
Targets: foo bar rab goo pkga pkgb pkgc pkgd pkge pkgf pkgg pkgh pkgi
[+ any reverse deps of pkg*, and so on ]
Continue? y/n
y
...Now, in the worst case scenario, the whole system will need to be upgraded. In the best case scenario (according to what we "mean" by pacman -Sy foo) only foo will be upgraded.
Have I missed something here? Could I just wrap that command and be 100% safe? Would it take a long time to resolve all those dependencies?
Last edited by salantrax (2012-08-27 02:03:26)
Offline
I expect the reason it isn't and won't be built into pacman is because, as you pointed out, the practice is highly discouraged.
Though I think the discouragement is a bit oversold; I did occasional partial updates for years with no issues.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Arch is rolling release. Regularly do "pacman -Syu" and you'll be fine. Trust me.
If you have built castles in the air, your work need not be lost; that is where they should be. Now put foundations under them.
Henry David Thoreau
Registered Linux User: #559057
Offline
I expect the reason it isn't and won't be built into pacman is because, as you pointed out, the practice is highly discouraged.
Though I think the discouragement is a bit oversold; I did occasional partial updates for years with no issues.
Then I would add to the hypothetical wrapper above:
echo "This practice is strongly discouraged. Do you *really* want to do this?"After all, packages with no dependency links don't depend on each other, right? Isn't that what dependency management is all about, to keep track of which operations are orthogonal and which ones aren't (and then resolve those that aren't)?
I concur about running pacman -Syu instead for now, but this thread is not about that. I would like to know why it is so evil to do partial upgrades, and why the functionality is missing. And 'how oversold is the discouragement, really'.
EDIT: If I had this knowledge, I would happily add an article about it in the wiki.
Last edited by salantrax (2012-08-22 21:15:21)
Offline
If you really want knowledge, do a serious, dilligent search (meaning, more than just typing 'partial update' into the search box) of the forums to see what has been said here already. I know at least one thread I posted to a while back got a detailed argument against by a dev or vet.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Some info why 'pacman -Sy' is not a good idea:
https://bbs.archlinux.org/viewtopic.php?id=89328
https://bbs.archlinux.org/viewtopic.php … 5#p1072495
Offline
Thank you for the answers, I'll check those threads and see if I can understand better.
Last edited by salantrax (2012-08-22 21:58:11)
Offline
I might be totally missing something here... But in what case would you rather want 'pacman -Sy' with dependency chain upgrade, than 'pacman -Syu'...? If only 'foopkg' has been updated (along with its dependency chain) in the repos, then your suggestion would do the same as 'pacman -Syu'. In the other case, if another package 'barpkg' that is not in 'foopkg' (reverse-)dependency chain gets an update, and you really don't want to upgrade it, shouldn't 'barpkg' be in IgnorePackage in pacman.conf...?
Offline
Note that pacman can handle this if we put full versioned dependencies and library dependencies in the packages. Arch Linux does not support partially updated systems, so there is no need for us to do that...
Offline
I might be totally missing something here... But in what case would you rather want 'pacman -Sy' with dependency chain upgrade, than 'pacman -Syu'...? If only 'foopkg' has been updated (along with its dependency chain) in the repos, then your suggestion would do the same as 'pacman -Syu'. In the other case, if another package 'barpkg' that is not in 'foopkg' (reverse-)dependency chain gets an update, and you really don't want to upgrade it, shouldn't 'barpkg' be in IgnorePackage in pacman.conf...?
Agree, but 'barpkg' could in reality be a whole lot of packages. I guess I would be talking about a flipped version of IgnorePackage (IgnoreAllButPackageAndItsDeps, if you will).
Note that pacman can handle this if we put full versioned dependencies and library dependencies in the packages.
My "solution" should work with the information already in the packages, no need for full versioned dependency information.
Arch Linux does not support partially updated systems, so there is no need for us to do that...
I'm not suggesting doing anything that means more work for the Developers. If there is no need for it, then it shouldn't be there, of course. I just mean that all the information is already there to make it work. And people other than I do use pacman -Sy (with manual care).
Unless I have misunderstood the Required By - variable, this could easily be automated be made a safe operation.
But I am pretty ready to agree that it is not a needed feature!
Last edited by salantrax (2012-08-26 22:56:45)
Offline
[bar]: Required By goo pkga pkgb pkgc pkgd pkge <-- These may have reverse dependencies of their own.
This essentially comes down to an -Syu anyway, so I cant see the point
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
[bar]: Required By goo pkga pkgb pkgc pkgd pkge <-- These may have reverse dependencies of their own.
This essentially comes down to an -Syu anyway, so I cant see the point
Yes. The worst case scenario is an -Syu, as I mentioned. Note however that 'bar' is only included in the upgrade if there is a newer version available. EDIT: This important point may be very unclear from my first post
Apologies
Assume I'm in a critical scenario, where I have limited time to deal with full system upgrade issues, if any. I want to do that the next day instead. Yet I absolutely need to install a package from the latest databases. Then I should be able to -Sy it safely, changing the system as absolutely little as possible.
I'm not going to yell at anyone for not including this. I'm going to wrap it myself and see what benefits and/or problems I encounter. Guess that should be the best way to learn, "Arch is what you make it", and so on. Thanks, everyone!
Last edited by salantrax (2012-08-27 01:59:22)
Offline
Assume I'm in a critical scenario, where I have limited time to deal with full system upgrade issues, if any. I want to do that the next day instead. Yet I absolutely need to install a package from the latest databases. Then I should be able to -Sy it safely, changing the system as absolutely little as possible.
You can just use pacman -S which will install the older (working) version. If you're in a situation where your system is far enough behind for this to matter, you really should not be using a rolling release distro.
A better current alternative would simply be to update more often.
I'm not going to yell at anyone for not including this. I'm going to wrap it myself and see what benefits and/or problems I encounter. Guess that should be the best way to learn, "Arch is what you make it", and so on. Thanks, everyone!
That's the spirit. Doesn't even seem very difficult to implement, actually. Tunnel down to the root of the dep tree and find all the leaves.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
If you're in a situation where your system is far enough behind for this to matter, you really should not be using a rolling release distro.
If I didn't use Arch, the new 'foo' package probably wouldn't even exist...
"Problem solved". ![]()
I [EDIT] don't agree with the points made against the -Sy practice. I want it "fixed" for mostly personal reasons. So I'm personally going to try and "fix" it. Ill report back.
Last edited by salantrax (2012-08-27 03:22:44)
Offline
Assume I'm in a critical scenario, where I have limited time to deal with full system upgrade issues, if any. I want to do that the next day instead. Yet I absolutely need to install a package from the latest databases. Then I should be able to -Sy it safely, changing the system as absolutely little as possible.
If you want this to carry any weight, you're going to need to specify. Unless you don't update your system frequently enough--in other words, if "pacman -Sy [package]" isn't your only bad system maintenance habit--then no such scenario should ever exist (I can't recall the title of the thread featuring Xyne's awesome story about why Arch might not be the best distro for sensitive operations, but some of you know what I'm talking about.
). Since "pacman -Sy [package]" carries no real benefits and very real risks, there's no sense in using it. Just update your system completely at your leisure and discretion, and install packages normally. Your "disagreement" with the arguments against "-Sy" in practice are a little confusing as well, since it's not a philosophical issue, but one of logical and technical limitations.
Offline