It refreshes the list of packages, but does not update any of them. The way many packages dependencies are versioned, when you install a new package that might need a newer version of a dependency it does not upgrade the dependency for you. It's not more explicit about versions because a non updated system is not supported by pacman/Arch. (as far as my understanding goes)
I do not understand why it would compile against libraries I do not have according to the man it would refresh all packages. Can you elaborate on that explanation?
This will be a completely contrived example, hopefully it will make sense.
1. Package foo 1.0 and package bar 1.0 are compiled against (depend on) library baz 1.0.
Your sync database (references to what packages and package versions are available in the repos) has foo 1.0, bar 1.0, and baz 1.0.
2. You pacman -S foo
You get foo 1.0 and because foo 1.0 depends on bar, you get bar 1.0 too.
Now foo, bar, and baz in the repositories get an update.
3. You pacman -Sy(y)
Your sync database now has foo 2.0, bar 2.0, and baz 2.0.
foo 2.0 and bar 2.0 are compiled against baz 2.0.
4. You pacman -S bar
You get bar, and because bar depends on baz, you get baz.. but no you don't. You already have baz installed.
Problem is, baz is 1.0, but bar depends on 2.0. Broken system.
Steps 3 and 4 can be combined, but are broken up for clarity. Hopefully it's a bit clear anyway.
Note.. Please, if I am incorrect, someone correct me so this information doesn't sit here wrong for future searches.
Last edited by rson451 (2010-08-02 20:03:06)
Edit: Ok here it goes.
Once upon a time there was a user that wanted to install firefox.
The user tried to do pacman -S firefox, but it didn't work because the all mighty pacman told him that firefox 3.2.4-1.i686.pkg.tar.gz could not be found on his mirror.
The user then tried pacman -Sy firefox. It worked and the user rejoiced, since he once again could go and troll /h/.
But all was not good.
The user had done a grave error.
When the user told the allmighty pacman to -Sy firefox, pacman did as it was told. It went and checked its database, found firefox, and noticed that firefox also wanted a new version of one of its friends, Readline.
The allmighty pacman therefor also updated readline. And it was this that would turn out to be the bane of the system.
The problem was that it was that it was no small version bump. Oh no, it was a bump from version 5 to version 6! And this ofcourse also included a .so name bump.
But the user was blissfully ignorant of all this. And after spending houers trolling /h/, he decided to go and troll /d/ too a bit, before going to sleep.
Before he went to sleep, he shut down the system, because it was quite noicy, with all the papst fans running at 6000rpm.
The next morning when the user turned on his system to check what had transpired in /b/ while he was asleep, the true horror was revealed.
Instead of getting his hello-kitty gdm login theme, he got a horrible message.
"error while loading shared libraries: lireadline.so.5: cannot open shared object file: No such file or directory"
Because bash (and others) depended on "readline" and not "readline<=5.x", it had not been updated together with readline. Therefor the user could no longer boot into his system.
The user struggled for houres with the system, to no avail. At last he gave up, booted his laptop and went to bbs.archlinux.org. And there he proceded to flame and rant about how a horrible os that archlinux was, and how nøøbish its developers was.
To this the glorious evil overloards on the bbs replied:
"PEBKAC. Don't upgrade single packages. Keep your system up to date. -> https://bbs.archlinux.org/viewtopic.php?id=57205 && http://bugs.archlinux.org/task/15566 && https://bbs.archlinux.org/viewtopic.php?id=75197"
Last edited by Mr.Elendig (2010-08-02 20:39:19)
@Mr.Elendig, rson451 and jak,
Thanks for the explanations. I'll avoid using the command in that way in future. I obviously misunderstood the man pacman explanation.
I was also lucky enough that nothing has broken for me in a looooong time in spite of having used the command that way.
Thread names like: "SOS my arch !" makes people less likely to help you.
I ignored this thread for quite some time because of the title.
Good. Now you can edit your title and add [SOLVED] so others can use it as a reference if they have a similar problem. wink
Yes, see the forum guidelines and this sticky post.
Pacman 4 can update a dependency chain:
add new -S --recursive operation to upgrade a full dep chain