zypper dup Is Not Picking the Package with the Highest Version Number. Why?

From what I’ve read, “zypper dup” should always install the newest version of a package, regardless of which repo it’s in. However, fore me, it’s not. As an example, here is the list of glib2 versions available to me.

http://i.imgur.com/EhZLx.png

As you can see, the newest version available is in Tumbleweed.

However, when I run “zypper dup”, it announces that libglib-2 is to be downgraded and switched to a different repo:

# zypper dup
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Loading repository data...
Reading installed packages...
Computing distribution upgrade...

The following packages are going to be upgraded:
<snip>

The following packages are going to be downgraded:
  glib2-devel glib2-tools libbluray1 libgio-2_0-0 libglib-2_0-0 libgmodule-2_0-0 libgobject-2_0-0 libgthread-2_0-0 

The following packages are going to change vendor:
<snip>
  libglib-2_0-0                               obs://build.opensuse.org/openSUSE:Tumbleweed -> openSUSE
<snip>

57 packages to upgrade, 8 to downgrade, 65  to change vendor.
Overall download size: 75.1 MiB. After the operation, 958.2 KiB will be freed.

I figured, okay, there must be some kind of priority issue. Let’s check the repos.


 # zypper lr -d
# | Alias                           | Name                            | Enabled | Refresh | Priority | Type   | URI                                                                      |
--+---------------------------------+---------------------------------+---------+---------+----------+--------+--------------------------------------------------------------------------+
1 | VLC_Tumbleweed_(Manually_Added) | VLC Tumbleweed (Manually Added) | No      | Yes     |   99     | rpm-md | http://download.videolan.org/pub/vlc/SuSE/Tumbleweed/                    |        
2 | VirtualBox                      | VirtualBox                      | No      | Yes     |  120     | rpm-md | http://download.virtualbox.org/virtualbox/rpm/opensuse/11.4              |        
3 | openSUSE:Stable_OSS             | openSUSE:Stable_OSS             | Yes     | Yes     |   99     | yast2  | http://download.opensuse.org/distribution/openSUSE-current/repo/oss/     |        
4 | openSUSE:Stable_Updates         | openSUSE:Stable_Updates         | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/update/openSUSE-current/                    |        
5 | openSUSE:Stable_non-OSS         | openSUSE:Stable_non-OSS         | Yes     | Yes     |   99     | yast2  | http://download.opensuse.org/distribution/openSUSE-current/repo/non-oss/ |        
6 | openSUSE:Tumbleweed             | openSUSE:Tumbleweed             | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/ |        

Hmmm…everything is the same priority except Virtualbox, and that isn’t coming in to play. Maybe some errant configuration file in the vendors folder? But…there are no files in /etc/zypp/vendors.d. So, I’m out of ideas.

Normally I wouldn’t care what version of glib2 is used, except that the version of pango in Tumbleweed is compiled against the glib2 in Tumbleweed, so a number of programs don’t work with the glib2 from the standard repo. Why is it picking that one over the Tumbleweed one? For now (as seen in the screenshot from Yast), I’ve manually installed it so things work. But why is it picking the “wrong” one?

Thanks

On 01/18/2013 08:36 AM, weedtumbler wrote:
> From what I’ve read, “zypper dup” should always install the newest
> version of a package, regardless of which repo it’s in.

don’t know where you read that, but it is incorrect…each repo has a
priority setting and when a package is available in several repos dup
will install from the repo with the highest priority (lowest number: for
example priority 10 is higher than priority 11)

there was a discussion recently between the ‘developers’ (on the
‘factory’ mail list) in which one of them demonstrated what works for
him in terms of repo priority…BUT even with those set ‘correctly’
there is info indicating that Tumbleweed is NOT something anyone can be
successful with by just doing “zypper dup” without thinking and deciding
what should be done!

see: http://lists.opensuse.org/opensuse-factory/2013-01/msg00212.html

where you will see priorities set to 97, 98 and 99 and STILL there is a
need for the Administrator to do more than just run zypper dup.


dd http://tinyurl.com/DD-Caveat

That is an incomplete statement, as you demonstrated by reviewing your repo priorities that could have made a difference. Did you try raising priority for the tumbleweed repo (although that is not what the Tw maintainer recommends), using -D or --dry-run for a preview of what will happen? I can understand why you took the manual approach. For some reason the resolver used by zypper dup took a different view…

As you found out, the devil is usually in the dependencies (e.g. pango and glib2), but you snipped out details about other packages changing vendor in the dup report. It may give a clue? zypper dup will change vendor to resolve a dependency (BTW “zypper dup --from <somerepo>” will also change a dependency’s repo away from that somerepo (see man zypper)).

I did experiment with making Tumbleweed take priority over the Current repos. As far as I can tell, that basically is equivalent to having Yast perform a “Switch System Packages” on the Tumbleweed repo. Which is fine, except some packages are more up-to-date in Current than in Tumbleweed (like PackageKit, etc).

What should I look for to resolve this issue? I deleted all remaining unnecessary repos (VLC and Virtualbox, though both were already set to “Disabled”) and also uninstalled all packages which are not available from Tumbleweed or Current. I’ve got another machine which is, as far as I can tell, configured identically, but it picks different packages when I issue “zypper dup.” For example, that machine chose glib2 from Tumbleweed and PackageKit from Current. The machine I’m having trouble with picks both glib2 and PackageKit from Current. Both have the same repos enabled with the same (default) priorities.

Thanks.

Like consused says, run

zypper dup --from YOUR_TUMBLEWEED_REPO

Note: after doing so, you’ll have to reapply the same thing on the Packman repo, since the above made a vendor change to TW happen on some packages from Packman too.

On 01/18/2013 10:16 PM, weedtumbler wrote:
> Both have the same repos enabled with the same (default) priorities.

did you read my post?


dd

That does the same thing as simply performing a “Switch System Packages” to Tumbleweed from Yast, correct? That’s actually what I ran to force the machine to switch the packages over to Tumbleweed. Then next time I run “zypper dup”, it wants to switch a bunch of packages (including glib2) back to Current again.

So you’re saying probably the best solution is to just install everything from Tumbleweed, and then go back and switch those packages which are newer in Current back to Current? And just never run “zypper dup” (always use “zypper dup --from tumbleweed” instead) again, since it doesn’t seem to be picking the right packages?

Yes, and thank you for posting. I forgot to address it in my previous reply.

Reading the material linked from your post is actually part of the reason I went ahead and disabled any and all non-recommended repos. So, no more Packman, no more VLC, no more Virtualbox. Only the recommended configuration with Current and Tumbleweed repos.

The thing I’m really confused about is, how come both machines, using the same architecture (x86_64), the same base release (12.2), and the same repos with the same priorities, don’t pick the same packages? One machine does the behavior I prefer, which is that it seems to switch freely between Tumbleweed and Current, depending on which version is higher where. The machine I’m having problems with, for some reason, absolutely always tries to install certain packages (glib2, for example) from Current, regardless of the version number. I understand I can force zypper to prefer the packages in Tumbleweed by altering the priorities, but I can’t quite wrap my ahead around why this is necessary on one machine and not another. Is there some minor configuration detail or other detail which can alter this behavior from machine to machine?

Additionally, altering the priorities doesn’t seem to quite emulate the functionality I’m seeing on the working machine. On that machine, PackageKit was installed from Current (highest version) and glib2 was installed from Tumbleweed (highest version). When I push Tumbleweed as higher priority (lower value) than Current, it gets both PackageKit (older version) and glib (newer version) from Tumbleweed. Is there any way to set up priorities such that zypper simply prefers whatever is the highest version, regardless of where it is or whether it requires a vendor change?

Yes. I mentioned --from (note BTW back there) to highlight the vendor change even with that “forced repo”, when dependencies have to be satisfied from other repos. The primary package comes from the --from repo, of course.

That’s actually what I ran to force the machine to switch the packages over to Tumbleweed. Then next time I run “zypper dup”, it wants to switch a bunch of packages (including glib2) back to Current again.

If you ran the YaST switcher, the following plain zypper dup will undo/reset/not honour it. You would need “zypper dup --from tumbleweed” or use YaST and probably redo the switch. I rarely use the switcher, but IIRC from other threads, that is what happens.

So you’re saying probably the best solution is to just install everything from Tumbleweed, and then go back and switch those packages which are newer in Current back to Current? And just never run “zypper dup” (always use “zypper dup --from tumbleweed” instead) again, since it doesn’t seem to be picking the right packages?

No I am not saying that., and that is not the way recommended by Greg K-H (Tw is his concept, implementation, and maintenance). Packages will change source for newer versions (e.g. security updates), that is expected. Do not use the YaST switcher regularly, but do use zypper dup regularly. Occasionally, since the resolver cannot perfectly solve every possible situation, it may need manual intervention on one or more packages with YaST or a zypper command with the --from option. That is why Tw is not really suitable for newbies who lack experience and/or confidence in solving package management issues. :slight_smile:

Edit timed out, and this should have been with my last post.

It should be enough to disable repos. Why remove totally unless you really have finished with them.

I have always used Packman at a higher priority, to prefer their multimedia packaging over openSUSE’s lack of support for restricted formats. There are even Packman repos for Tw.

For openSUSE repos, including tumbleweed, and a subpixel repo, I leave at priority 99. I’ve only ever used zypper dup --from for two occasions: 1. Going from openSUSE standard to Tw; 2. IIRC to get a specific Tw kernel upgrade that was prevented by some vbox packages installed by the KDE liveCD (long thread about that one).

On 01/18/2013 11:06 PM, weedtumbler wrote:
> Is there any
> way to set up priorities such that zypper simply prefers whatever is the
> highest version, regardless of where it is or whether it requires a
> vendor change?

not that i am aware of…

and, what you seem to not know is that it IS (as you have seen) possible
for the ‘current’ repos to contain software newer than that in the
Tumbleweed repo…AND, what that means is that the newer code in the
‘current’ repo has NOT been tested, approved for, and moved to the
Tumbleweed repo by the Tumbleweed maintainer(s)…

SO, when you decide to pull in untested code into your Tumbleweed then
you are on your own as a software tester (that is, you are no longer
running Tumbleweed, but instead some kind of Tumbleweed +
Self_Selected_Untested_Code_Frankenstein)…which is great, if you
wanna be a software tester!

if on the other hand you want to run Tumbleweed than do that, and stop
the testing…

then, if/when the new code in ‘current’ is tested and approved it will
migrate to the Tumbleweed repo and ‘automatically’ be installed to your
system by zypper dup (if you have your priorities set correctly)

now, to your question of why is one machine different from the other–i
don’t know, maybe it is magic…or, maybe it is because one machine has
different untested code than the other machine’s…the number of
potential variations in code base and config setting is too large to
calculate.

so (caveat: i’ve never run Tumbleweed) i’d say it best to set the
priorities similar to those in the post i pointed to (with all ‘current’
repos a lower priority than all Tumbleweed repos), and that way zypper
should always install the code in the Tumbleweed repos (and not the
newer but untested code which has not (yet) been included in Tumbleweed)…

and: i have no idea where you got the idea that you should remove
packman…hmmmm…from what i see there is a Tumbleweed-Packman repo
(in the post i pointed to) with a priority higher than all the ‘current’
repos.

by the way, i’ve not run Tumbleweed because i much prefer a stable,
dependable, reliable, predictable system over bleeding edge plus…

(compared to SUSE Linux Enterprise, or Red Hat Enterprise, or Debian
stable, or Win8 and probably Win9) openSUSE 12.2 is bleeding edge
software…and Tumbleweed at the very pointy tip of the bleeding edge.

but when folks add as yet untested software from ‘current’ to
Tumbleweed, then . . .

ymmv, and all are free to do as they wish.


dd http://tinyurl.com/DD-Caveat

dd wrote:
>
> but when folks add as yet untested software from ‘current’ to
> Tumbleweed, then . . .
>
> ymmv, and all are free to do as they wish.

How’s your mileage?
Do you know what “Current” is?

Vahis

http://waxborg.servepics.com
openSUSE 11.4 (x86_64) 2.6.37.6-0.20-default main host
openSUSE 12.2 (x86_64) 3.7.2-18-desktop Tumbleweed in VirtualBox
openSUSE 12.2 (i586) 3.4.11-2.16-desktop in EeePC 900

There is a massive thread which revealed a bug IMO
Read it all and see
https://forums.opensuse.org/english/get-technical-help-here/tumbleweed/479381-opensuse-tumbleweed-new-user-not-being-offered-3-6-kernel-during-zypper-dup.html?highlight=dup

On 01/19/2013 08:55 AM, Vahis wrote:
> Do you know what “Current” is?

yes.

well, i think i do…i think today “Current” is 12.2, while a few
months back it was 12.2, and in a few months it will be 12.3, and etc…


dd

Actually for 12.2 you want 12.2 repos
The Current range are for Tumbleweed

We are not having English lessons here or we could describe current as in dried fruit or electric flow…
So lets not be pedantic about the current stable release, because we are not talking about that…

dd wrote:
> On 01/19/2013 08:55 AM, Vahis wrote:
>> Do you know what “Current” is?
>
> yes.
>
> well, i think i do…i think today “Current” is 12.2, while a few
> months back it was 12.2, and in a few months it will be 12.3, and etc…
>

Ok, so you do know that “Current” is a link to the latest release. Good.

Then why do you say it’s “untested”?

Vahis

http://waxborg.servepics.com
openSUSE 11.4 (x86_64) 2.6.37.6-0.20-default main host
openSUSE 12.2 (x86_64) 3.7.2-18-desktop Tumbleweed in VirtualBox
openSUSE 12.2 (i586) 3.4.11-2.16-desktop in EeePC 900

caf4926 wrote:
>
> Actually for 12.2 you want 12.2 repos
> The Current range are for Tumbleweed

The “Current” repos are just links to the normal latest released repos
(Now 12.2).

When a new release is out (next is 12.3) the links will be redirected to
those.

That’s all.
>
> We are not having English lessons here or we could describe current as
> in dried fruit or electric flow…

Or as in the reo’s name, Current is current which is now 12.2.

> So lets not be pedantic about the current stable release, because we
> are not talking about that…

Oh yes we are.

Vahis

http://waxborg.servepics.com
openSUSE 11.4 (x86_64) 2.6.37.6-0.20-default main host
openSUSE 12.2 (x86_64) 3.7.2-18-desktop Tumbleweed in VirtualBox
openSUSE 12.2 (i586) 3.4.11-2.16-desktop in EeePC 900

Yes, that is right.

No, you are guessing. Greg-KH has posted that it is normal with plain zypper dup to have package sources change between tumbleweed and current or standard openSUSE update repos. He supports that approach, so one must assume that he practices that approach on his own systems.

SO, that makes no sense when one is following the prescribed process (zypper dup) with the supported repo configuration.

then, if/when the new code in ‘current’ is tested and approved it will
migrate to the Tumbleweed repo and ‘automatically’ be installed to your
system by zypper dup (if you have your priorities set correctly)

That’s a theoretical view, and misleading. The “new code” is not sourced or migrated from “current”, and new tumbleweed versions are usually newer versions than “current” plus current updates.

(caveat: i’ve never run Tumbleweed)…

Perhaps you shouldn’t be giving advice to other users on how to run it, if you haven’t checked it out for yourself first. Has Greg-KH advised Tw users to change priorities? If so, have you a reference link for that?

That is the long thread I was alluding to earlier.

But not a bug in “your opinion” :D. So, a bug in what area, IYO?

Well if IIRC
I know from my personal experience that my use of TW has been from a DVD install and ‘dup’ always worked as expected.
But it seems where the Live CD is used and the same steps are followed to switch to TW, ‘dup’ doesn’t work as expected.
Where or what the bug is I don’t know