You are not logged in.
I read the above in this thread http://bbs.archlinux.org/viewtopic.php?id=89273
I have been using arch for a while and was under the impression that refreshing the package metadata when installing packages was a good thing to do so as to avoid any dependancy issues?
I can't find a conclusive reason why this is not the case in the pacman wiki page and was wondering if someone could enlighten me.
thanks
Matt
Offline
It can create dependency issues as Arch is designed only to have the latest versions of packages installed.
e.g. enable testing and install the latest firefox with "pacman -Sy firefox"... that will pull in the new versions of libjpeg and libpng which will break a lot of your applications that still require the old version. Updating all packages avoids that issue.
Issues with graphical packages is not so bad, but people got themselves into major trouble when updating readline (broken bash...)
Offline
It can create dependency issues as Arch is designed only to have the latest versions of packages installed.
e.g. enable testing and install the latest firefox with "pacman -Sy firefox"... that will pull in the new versions of libjpeg and libpng which will break a lot of your applications that still require the old version. Updating all packages avoids that issue.
Issues with graphical packages is not so bad, but people got themselves into major trouble when updating readline (broken bash...)
well, this is only partially true:
I did sudo pacman -Syu
got new rasqal that is not compatible with rasqal dependent software.
I don't think that pacman -Sy pkg is bad as long as you read what is going to be updated. Then say yes/no
Nobody can garantee that pacman -Syu will protect against mishaps. Only remedy is to keep last working version of pkg until you are certain that update did not break other related (but not updated) stuff.
Offline
One should be reading pacman's output whether or not they are using -Sy(u). I'm going to have to go with Allan on this one though, it makes sense to update the whole system then to update a single application and risk that it's incompatible with previous versions of other applications/libraries/etc.
Offline
Well, there is a lot of "pacman -Sy pkg" in the wiki, could an admin write a script that changes all those to -S?
Offline
e.g. enable testing and install the latest firefox with "pacman -Sy firefox"... that will pull in the new versions of libjpeg and libpng which will break a lot of your applications that still require the old version. Updating all packages avoids that issue.
There is no xfdesktop in testing that depends on the new packages...?
Also I don't really understand why you are forced tu uninstall old libs. For example I installed firefox and it's deps from testing today and installed libpng and libjpeg from AUR so that I can run xfdesktop.
Yes, I know, I am doing it wrong.
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
xfdesktop doesn't link to libpng/libjpeg. are you sure you are not using other cairo package rather the one from repos?
Last edited by wonder (2010-01-22 17:31:11)
Give what you have. To someone, it may be better than you dare to think.
Offline
Yes, I could not start xfdesktop without libjpeg7 and the libpng.
I installed the ones from AUR and it works good.
edit: xfdesktop needs at least libjpeg to render my desktop background
Last edited by Cdh (2010-01-22 17:39:25)
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
One should be reading pacman's output whether or not they are using -Sy(u). I'm going to have to go with Allan on this one though, it makes sense to update the whole system then to update a single application and risk that it's incompatible with previous versions of other applications/libraries/etc.
# pacman -Sy [pkg] doesn't update a single package, it syncs the pacman database and then installs. That way the newly installed program was installed from a fresher sync than the last -Syu operation which can potentially lead to trouble.
Offline
Yes, I could not start xfdesktop without libjpeg7 and the libpng.
I installed the ones from AUR and it works good.edit: xfdesktop needs at least libjpeg to render my desktop background
you really think that i don't know what i'm talking about?
pacman -Qlq xfdesktop | xargs file | grep ELF | awk -F: '{print $1}' | while read elfobj; do readelf -d $elfobj | grep NEEDED | sed 's/\[//;s/\]//' | nl | while read c1 c2 c3 c4 c5 c6; do echo $p,$elfobj,$c1,$c6; done; done
it doesn't link! other dependency link to libjpeg/libpng.
Last edited by wonder (2010-01-22 18:37:28)
Give what you have. To someone, it may be better than you dare to think.
Offline
Well, there is a lot of "pacman -Sy pkg" in the wiki, could an admin write a script that changes all those to -S?
I know and it's annoying. Someone keeps going through the articles I've written and changing the flags to -Sy. It should be assumed that whenever installing a new application the user has already run -Syu to ensure their system is up to date. Therefore the -y is not necessary and just slows down the installation process for those who copy/paste from the wiki.
thayer williams ~ cinderwick.ca
Offline
I've always considered the behavior and lack of documentation a bug. Unix command switches are supposed to be orthogonal and safe to use in combination. Combinations not intended to be used should not exist, should not parse, or at least should be loudly documented. More importantly, unsafe actions should be obvious. "rm -rf /" is pretty obvious from reading the docs. "pacman -Sy <package>" is not. It is amazing the denials people will go through so that they do not have to talk about this.
Someone keeps going through the articles I've written and changing the flags to -Sy.
Some people are evil and/or misinformed and/or hate Arch.
I've resorted to never using pacman, instead writing a wrapper (pacmatic) to take care of the most dangerous, trivial and easy to patch problems.
Edit: The devs are cool, but there is just such a huge gap between how they understand pacman should be used, and what users actually do with it.
Last edited by keenerd (2010-01-22 18:55:10)
Offline
Unfortunately, this (mis)information has propagated to many pacman translations on the wiki (which would explain why editors are using these flags). This was amended only in June 2009 (see this revision). I've added a note to the English version, for what it's worth.
M*cr*s*ft: Who needs quality when you have marketing?
Offline
it doesn't link! other dependency link to libjpeg/libpng.
Maybe not directly, I don't know.
What I know is:
I typed xfdesktop in the terminal and got the error about the missing libjpeg. I didn't research what xfdesktop might have called that needs libjpeg.
Try -Rd libjpeg and starting xfdesktop yourself.
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
hatten wrote:Well, there is a lot of "pacman -Sy pkg" in the wiki, could an admin write a script that changes all those to -S?
I know and it's annoying. Someone keeps going through the articles I've written and changing the flags to -Sy. It should be assumed that whenever installing a new application the user has already run -Syu to ensure their system is up to date. Therefore the -y is not necessary and just slows down the installation process for those who copy/paste from the wiki.
Hmm.. I've seen this coming up a few times lately, in fact i recently changed one "-Sy" to "-S" on the beginers guide that seemed to be catching a few people out. It might be worth adding some sort of warning about running "pacman -Sy <somepkg>" so that hopefully people know the risks right from the off (might link this disscusion as well). What do people think?
() Registered Linux user #500376
/\ www.asciiribbon.org - against html e-mail
Offline
What I know is:
I typed xfdesktop in the terminal and got the error about the missing libjpeg. I didn't research what xfdesktop might have called that needs libjpeg.
Try -Rd libjpeg and starting xfdesktop yourself.
fully updated from testing, xfdesktop working fine. like i said before be sure you are not using some packages from aur. is simple to debug, using my previous command find out on what it links, find out the package that contain that so and see if you have the latest version.
Last edited by wonder (2010-01-22 20:04:05)
Give what you have. To someone, it may be better than you dare to think.
Offline
I've always considered the behavior and lack of documentation a bug. Unix command switches are supposed to be orthogonal and safe to use in combination. Combinations not intended to be used should not exist, should not parse, or at least should be loudly documented. More importantly, unsafe actions should be obvious. "rm -rf /" is pretty obvious from reading the docs. "pacman -Sy <package>" is not. It is amazing the denials people will go through so that they do not have to talk about this.
Here goes my denial....
On a "stable release" distro where there are no library soname bumps, "pacman -Sy <pkg>" is perfectly safe. So it is not a bug as far as pacman is concerned.
On Arch, we only support the package version that are currently in the repos. "pacman -Sy <pkg>" can lead to a mixture of packages that are currently in the repos and some that are outdated so leads to an unsupported system... Its use is still not a bug and in fact I use it quite often when I do not do a full update, but I know exactly what I am doing and am prepare to fix breakage.
Offline
I read the above in this thread http://bbs.archlinux.org/viewtopic.php?id=89273
I have been using arch for a while and was under the impression that refreshing the package metadata when installing packages was a good thing to do so as to avoid any dependancy issues?
I can't find a conclusive reason why this is not the case in the pacman wiki page and was wondering if someone could enlighten me.
thanks
Matt
pacman -Sy is perfectly fine for experienced users, imho..and certainly preferable under a few conditions. There have been times when this has been recommended in the front page news.
I believe it should not be recommended in the wiki because a.) we have people who are very new, following howtos line by line and b.) it can, in some cases lead to breakage or pacman complaints (especially if you have not upgraded the entire system in a while).
In conclusion, it is appropriate rarely, and should be recommended rarely..imho.
Offline
Thank you Allan. I hope this does not come off as being personal, but you clearly outlined two major points.
On a "stable release" distro where there are no library soname bumps, "pacman -Sy <pkg>" is perfectly safe. So it is not a bug as far as pacman is concerned.
A broken clock is still correct twice a day. "Stable clock" users only look at their clock twice a day, and it is correct when they do. It works flawlessly for this possibly-hypothetical-but-possibly-very-important-minority of people, so it is not a bug.
but I know exactly what I am doing and am prepare to fix breakage.
Before you could know, you had to learn. How did you learn exactly what "-Sy package" does? It is not in the fine man page. No first timer understands what it does. RTDM (Read The Dev's Mind) appears to be the only way.
Offline
fully updated from testing, xfdesktop working fine. like i said before be sure you are not using some packages from aur. is simple to debug, using my previous command find out on what it links, find out the package that contain that so and see if you have the latest version.
Maybe there is something in testing that prevents it. I don't know and at the moment I don't care too much.
Actually I sometimes run into such situations:
I do pacman -Syu, then I see "oh, 500 mb updates, I will do that later" and abort.
After doing something else I want to install something with pacman -S which is not very good. Yes, pacman tells me what it is doing but I do not always have in mind I did not upgrade yet.
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
Allan wrote:but I know exactly what I am doing and am prepare to fix breakage.
Before you could know, you had to learn. How did you learn exactly what "-Sy package" does? It is not in the fine man page. No first timer understands what it does. RTDM (Read The Dev's Mind) appears to be the only way.
The man page tell you exactly what "-Sy <pkg>" does; updates the database installs the package, pulling in any needed dependencies. This is not a bug in pacman. It does exactly what is asked, and being flexible package management system is a good thing.
The fact that pulling some new deps might break your system is an Arch packaging choice. Given we only support the packages currently in our repos, we do not see this as an issue as if your system is fully up-to-date when you do this, nothing will break. We expect our users to be competent enough to fix very minor issues like this. Worst case scenario requires a rescue disk and a full update and that should not be beyond the competent Linux user that Arch is aimed at.
Note that last time this was brought up, someone went through the wiki changing many references of "pacman -Sy <pkg>" to just "pacman -S <pkg>" but then other people know better and changed them back...
Offline
Cows wrote:One should be reading pacman's output whether or not they are using -Sy(u). I'm going to have to go with Allan on this one though, it makes sense to update the whole system then to update a single application and risk that it's incompatible with previous versions of other applications/libraries/etc.
# pacman -Sy [pkg] doesn't update a single package, it syncs the pacman database and then installs. That way the newly installed program was installed from a fresher sync than the last -Syu operation which can potentially lead to trouble.
Yes but it essentially ends up doing the same thing, at least for this example.
pacman -Sy refreshes database, and then you install whatever application you want that's new from the refreshed database. New application, maybe new libs and other things attached to that new application. The system hasn't been updated as a whole and therefore could have compatibility issues.
pacman -Syu refreshes database and updates all installed applications. Then you can install whatever application you want and it would have a better chance of it working fine because the system is up to date.
Offline
Let me review and see if I've got this right. If I want to install a new package foo, the best approach is:
pacman -Syu
pacman -S foo
The following, alternative approach is dangerous because it might update some of the libraries I already have installed that some of my other packages use, without upgrading those other packages:
pacman -Sy foo
(Is that really true? `pacman -Sy foo` might upgrade some dependencies, it won't restrict itself to only pulling in packages I don't yet have installed? Or have I misidentified what it is bad that `pacman -Sy foo` might do?)
This is allegedly somewhat better:
pacman -S foo
though not as good as the first option. One reason it's better is that it doesn't waste time synching. But it's also allegedly safer. (Why exactly?) However, if my local cache of the repo metadata is out of date, say locally I think the latest version of foo (or of a lib foo depends on that I don't have installed) is 1.0, but remotely the latest version is 2.0, what will happen when I do `pacman -S foo`? I'll get version 2.0? The install will fail? I don't think I'll get version 1.0, will I?
I understand why the first choice is better than the other two, but I don't understand clearly why the third choice should be more reliable or safer than the second. And I've been using Arch for a while now...
Last edited by Profjim (2010-01-23 04:53:00)
Offline
Another problem with doing pacman -Sy pkg. Even if that doesn't break anything, if you then go and install other packages without upgrading the system, you might (or might not) eventually break something. So you are always just better off to pacman -Syu if you are after the latest version of a package.
Offline
Another problem with doing pacman -Sy pkg. Even if that doesn't break anything, if you then go and install other packages without upgrading the system, you might (or might not) eventually break something. So you are always just better off to pacman -Syu if you are after the latest version of a package.
Yes, but I think this thread is about how best to install new packages, not about doing piecemeal upgrades.
Offline