My name’s Guillaume, former french - so excuse my English - , I am not a new Linux user, however i just started to use opensuse and it sounds great.
I used Debian for years and decided to just give a try to something different.
My question is about packages management.
I understand you can use zypper (that i prefer - i’ll compare it to debian apt) or yast (the graphical - i’ll compare it to the ubuntu graphical stuff.).
Recently i wanted to use banshee to put my media collection and it bugged. It appears there is a bug on banshee 1.4.1.
So i added the banshee repo (with yast). Then zypper refresh and the zypper up banshee-1.
And everything it said nothing to update.
Then i started the yast graphical software manager and i can see many update available…
I really don’t understand ??? i know there something about upgrading patch or package (i red the doc) but i’m a bit lost in there…
Can u giv me some help please???
Actually YaST and zypper are front-ends to the libzypp library. You can do the same things in zypper as in YaST, but as pointed out, you have to do all the things that YaST does too to get the same result, in this case a refresh. Some things happen asynchronously, so it could be that the first time you did a refresh, it wasn’t ready for you yet.
Adding repository ‘Banshee Media Player (openSUSE_11.1)’ [done]
Repository ‘Banshee Media Player (openSUSE_11.1)’ successfully added
Enabled: Yes Autorefresh: No
URI: Index of /repositories/Banshee/openSUSE_11.1
I’m not sure if it’s also disabled by default if you add it through other ways.
But YaST should also refresh ONLY the repositories configured to do so. If it’s refreshing all of them it’s a bug.
So yes, YaST and zypper should behave equal. The thing is “zypper up” will not update to any newer version available.
For a package to be updated through zypper up:
A newer version must be available.
This version must have the same Vendor.
The repository where the new version is available must have an equal or greater priority than the repository from where the installed version is available.
Note that zypper dup ignores the Vendor condition. But it’s different, it isn’t supposed to be used for normal updates.
There is also a timing parameter to be considered:
##
## Amount of time in minutes that must pass before another refresh.
##
## Valid values: Integer
## Default value: 10
##
## If you have autorefresh enabled for a repository, it is checked for
## up-to-date metadata not more often than every <repo.refresh.delay>
## minutes. If an automatic request for refresh comes before <repo.refresh.delay>
## minutes passed since the last check, the request is ignored.
##
## A value of 0 means the repository will always be checked. To get the oposite
## effect, disable autorefresh for your repositories.
##
## This option has no effect for repositories with autorefresh disabled, nor for
## user-requested refresh.
##
# repo.refresh.delay = 10
You are assuming that zypper is always run as root. Some zypper operations can be run as a normal user. If you do a zypper lu, and the repo cache is out of date it will warn you. But if it is not out of date you can get useful information out of it.
Not everything has to be run as root all the time. People get stuck into this mentality that e.g. you have to run ifconfig, route or arp as root, because they are in /sbin, or they have only ever seen it run as root. In fact, a good subset of the functionality is available to ordinary users.
Well, I explicitly mentioned zypper up/dup and running those commands as non-root would not really make sense.
There is also a weakness or how shall I call it about some zyppper commands not being run as root, especially “zypper se”-commands.
At some time (I really couldn’t figure out which time span) after the last refresh, I don’t get a warning any more but zypper even refuses to perform zypper se as non-root user and just exits with a remark that the metadata is too old.
//Edit:
I’m not talking about this here:
zypper se -s compal-laptop-kmp-default
Repository 'openSUSE-11.1-Update-test' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
--+---------------------------+---------+-------------------------+--------+----------------------------------------------
i | compal-laptop-kmp-default | package | 0.2.9_2.6.27.21_0.1-1.1 | x86_64 | Akoellh's Home Project (openSUSE_11.1_Update)
v | compal-laptop-kmp-default | package | 0.2.9_2.6.27.21_0.1-1.1 | i586 | Akoellh's Home Project (openSUSE_11.1_Update)
this is the “normal” warning when metadata is out of date.
I will post the respective message when I get the behaviour described above.
But of course using root only when absolutely necessary should be “best practice” with all commands.
Yes i fugure out that zypper is the CLI and yast the GUI and they use the same libraries but look at this :
stocker:~ # zypper ref
Repository ‘repBanshee’ is up to date.
Repository ‘NVIDIA Repository’ is up to date.
Repository ‘openSUSE-11.1-Non-Oss’ is up to date.
Repository ‘openSUSE-11.1-Oss’ is up to date.
Repository ‘openSUSE-11.1-Update’ is up to date.
Repository ‘VideoLan Repository’ is up to date.
Repository ‘Packman Repository’ is up to date.
All repositories have been refreshed.
stocker:~ # zypper lr -P
====> conclusion : everythin is up to date!!! … at least for zypper…
But if i use Yast and go to “software manager” (i’m french so i translate) and look at the middle column (updates) i can find 21 updates available!!!
And everything is in the aut-refresh mode!!! in the CLI and the GUI. I actually managed to add the new repo and option with the GUI and do the other task with the CLI…
stocker:~ # zypper dup
Loading repository data...
Reading installed packages...
Computing distribution upgrade...
The following packages are going to be upgraded:
gstreamer-0_10 gstreamer-0_10-schroedinger hplip hplip-hpijs ktoblzcheck libdvbpsi5
libfaac0 libgpod-tools libgstreamer-0_10-0 libofx4 libschroedinger-1_0-0 mono-addins
mono-zeroconf mono-zeroconf-provider-avahi ndesk-dbus ndesk-dbus-glib podsleuth
tightvnc usb_modeswitch xsane
The following NEW packages are going to be installed:
blt gamin gstreamer-0_10-lang imlib2 inkscape-extensions-fig
inkscape-extensions-skencil libcaca0 libgpod4 libktoblzcheck1 liboil-0_3-0
libquicktime0 libsndfile1 lomoco python-imaging python-lcms python-tk sk1 tix transfig
The following packages are going to be REMOVED:
fam libcaca liboil libquicktime
The following packages are going to change vendor:
gstreamer-0_10 gstreamer-0_10-schroedinger hplip hplip-hpijs ktoblzcheck libdvbpsi5
libfaac0 libgpod-tools libgstreamer-0_10-0 libofx4 libschroedinger-1_0-0 mono-addins
mono-zeroconf mono-zeroconf-provider-avahi ndesk-dbus ndesk-dbus-glib podsleuth
tightvnc usb_modeswitch xsane
Overall download size: 24.2 M. After the operation, additional 32.9 M will be used.
Continue? [YES/no]: YES
As you can see, the 21 updates i could see in yast are now seen by zypper!!!
Good. I guess that for the next time, i won’t have to “dup” as it already sync with the right repos!
Cool for all those advices!! opensuse is really good.
Withe the zypper stuff, you get close to debian and as i was a bit tired of the dig deep to do simple stuff, opensuse seems to suits me! Bye (it 4:25am in paris. Got to sleep…)
Well, I don’t use YaST too much and I though this was solved with openSUSE 11.1, but seems it was only half fixed.
If you look at Re: [softwaremgmt] What is wrong with softwaremgmt in 11.0. ?SVN status? you will see that at really YaST isn’t using the same algorithms than zypper.
The software management stack in openSUSE has changed a lot from the 9.x and the 11.x series. Now, with libzypp, we have the good solution… zypper uses it, but YaST still doesn’t always. Perhaps for 11.2 it will be totally solved.
In the referenced mail is all explained. In YaST the applications try to do things in their own, not asking libzypp… and that’s bad.
So, we have different “updates”:
zypper lu -a
This one was “zypper lu” in 11.0, but it’s plain wrong. It will list all packages with a higher version-release number than the installed ones.
The problem is that it ignores repository priorities and vendor changes.
It just does a simple test, searching for packages with the same name but higher version. So if a package update changes the name it isn’t shown… and it can even show packages that aren’t installable (because of missing dependencies).
zypper lu/zypper up (the first only lists, the latter does the update)
This one is The Correct ™ one, use it. It will update with the conditions explained in my last post (same vendor, higher priority).
zypper lu -t patch/zypper up -t patch
This one only looks for patches, not for packages. So only updates from the official updates repo are shown.
zypper dup
It’s supposed to be used to upgrade to the next openSUSE version (even if isn’t officially supported). Similar to “zypper up”, but “different”… it will downgrade if necessary, ignores the vendor changes and other minor differences.
YaST sw_single Qt “Upgrade if newer” and GTK “Updates”
I just tested it. It is similar to “zypper lu -a” but honors repository priorities and ignores the locks.
A little better than “zypper lu -a”… but wrong. Being so broken I would not recommend anyone to use it.
The problem is that the third party Packman repository (that hosts patented codecs and more) sometimes changes the vendor of its packages between “http://packman.links2linux.de” and “packman.links2linux.de”. Since that means a vendor change zypper up will ignore the update. With this file you say that both strings are from the same vendor.