Bug 337370

Summary: yast2-theme-openSUSE-Crystal removes yast2-*
Product: [openSUSE] openSUSE 10.3 Reporter: Marco Michna <mmichna>
Component: YaST2Assignee: Jan Kupec <jkupec>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: dmacvicar, locilka, mvidner
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 10.3   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: complete zypper.solverTestCase

Description Marco Michna 2007-10-27 13:08:05 UTC
As already mentioned in the "hijacked" Bug 327437.

When you try to install yast2-theme-openSUSE-Crystal then it wants to remove main modules of YaST2.

Here is one example (workstation):

--8<--
The following packages are going to be REMOVED:
  inst-source-utils yast2-inetd yast2-tv yast2-scanner yast2-iscsi-client 
yast2-ntp-client yast2-theme-openSUSE yast2-backup yast2-slp yast2-support 
yast2-metapackage-handler yast2-nis-client yast2-restore yast2-profile-manager
-->8--

And another (laptop):

--8<--
The following packages are going to be REMOVED:
  yast2-scanner yast2-backup yast2-samba-server yast2-support yast2-slp 
yast2-ntp-client autoyast2 yast2-sudo yast2-samba-client yast2-iscsi-client 
yast2-restore yast2-inetd yast2-tv yast2-theme-openSUSE yast2-printer 
inst-source-utils yast2-metapackage-handler
-->8--

A simple way to reproduce:

     zypper in yast2-theme-openSUSE-Crystal
Comment 1 Michal Zugec 2007-10-29 07:45:32 UTC
Yes, reproduced:

rpm -i --test /work/CDs/all/full-i386/suse/noarch/yast2-theme-openSUSE-Crystal.rpm
chyba: Failed dependencies:
        yast2-theme-openSUSE conflicts with yast2-theme-openSUSE-Crystal-2.15.14-16.noarch
        yast2-theme-openSUSE-Crystal conflicts with yast2-theme-openSUSE-2.15.14-4.noarch
linux:/home/mzugec # rpm -e --test yast2-theme-openSUSE
chyba: Failed dependencies:
        yast2_theme is needed by (installed) yast2-2.15.58-12.i586
        yast2_theme is needed by (installed) kdebase3-SuSE-10.3-152.i586

Stefan?
Comment 2 Marco Michna 2007-10-29 09:17:48 UTC
What you reproduced is not the actual problem. That problem is handled in another bug. The problem in this bug actually is that if you use zypper to install yast2-theme-openSUSE-Crystal then it deletes YaST2 modules.
Comment 3 Stefan Hundhammer 2007-10-29 10:41:00 UTC
What would the dependencies from #1 have to do with any other packages getting uninstalled? This is only about no more than one theme package being installed at the same time.
Comment 4 Marco Michna 2007-10-29 11:24:58 UTC
Lets ask the one who did that.
Comment 5 Lukas Ocilka 2007-10-29 12:59:24 UTC
%package yast2-theme-openSUSE
Provides:       yast2_theme = %{version}
Provides:       yast2-theme-UnitedLinux
PreReq:         /bin/ln
Requires:       hicolor-icon-theme
Obsoletes:      yast2-theme-SuSELinux
Obsoletes:      yast2-theme-UnitedLinux
Conflicts:      yast2-theme-openSUSE-Crystal

%package yast2-theme-openSUSE-Crystal
Provides:       yast2_theme = %{version}
Provides:       yast2-theme-UnitedLinux
PreReq:         /bin/ln
Requires:       hicolor-icon-theme
Obsoletes:      yast2-theme-SuSELinux
Obsoletes:      yast2-theme-UnitedLinux
Conflicts:      yast2-theme-openSUSE

I'm not an expert for RPM dependencies but I'd say that this rather seems to be a dependency-solver issue.

  * Both packages provide "yast2_theme"
  * Packages are in conflict with each other.
Comment 6 Duncan Mac-Vicar 2007-10-29 14:50:32 UTC
Marco, please attach a solver testcase of the installation of that package using zypper or sw_single
Comment 7 Marco Michna 2007-10-29 15:26:40 UTC
Created attachment 181036 [details]
complete zypper.solverTestCase
Comment 8 Stefan Schubert 2007-11-05 16:25:41 UTC
I have rerun the solvertestcase and that error messages has been reported:


>!> Installing yast2-theme-openSUSE-Crystal.noarch from channel 1
>!> 2 problems found:
>!> Problem:
>!> Cannot install yast2-theme-openSUSE-Crystal, because it is conflicting with yast2-theme-openSUSE
>!> A conflict over yast2-theme-openSUSE-Crystal == 2.15.14-4 (yast2-theme-openSUSE-Crystal) requires the removal of yast2-theme-openSUSE-Crystal-2.15.14-4.noarch[1] which is scheduled for installation
=== yast2-theme-openSUSE-Crystal-2.15.14-4.noarch[1] ===
    yast2-theme-openSUSE-Crystal-2.15.14-4.noarch[1] will be installed by the user.
    bash-3.2-61.x86_64 is needed by yast2-theme-openSUSE-Crystal-2.15.14-4.noarch[1] (/bin/sh)
    hicolor-icon-theme-0.10-37.noarch is needed by yast2-theme-openSUSE-Crystal-2.15.14-4.noarch[1] (hicolor-icon-theme == 0.10-37)
    coreutils-6.9-43.x86_64 is needed by yast2-theme-openSUSE-Crystal-2.15.14-4.noarch[1] (/bin/ln)
    yast2-theme-openSUSE-Crystal-2.15.14-4.noarch[1] is needed by yast2-2.15.58-12.x86_64 (yast2_theme == 2.15.14)
=== yast2-theme-openSUSE-2.15.14-4.noarch ===
    yast2-theme-openSUSE-2.15.14-4.noarch conflicts with yast2-theme-openSUSE-Crystal
    yast2-theme-openSUSE-2.15.14-4.noarch replaced by yast2-theme-openSUSE-Crystal-2.15.14-4.noarch[1]

>!>    Solution:
>!>       do not install yast2-theme-openSUSE-Crystal
>!>       do not install yast2-theme-openSUSE-Crystal-2.15.14-4.noarch[1]
>!>    Solution:
>!>       delete yast2-theme-openSUSE
>!>       delete yast2-theme-openSUSE-2.15.14-4.noarch
>!>    Solution:
>!>       Ignore this conflict of yast2-theme-openSUSE-Crystal
>!>       
>!> Problem:
>!> pattern:yast2_basis has missing dependencies
>!> There are no installable providers of yast2-theme-openSUSE for pattern:yast2_basis-10.3-159.x86_64
=== pattern:yast2_basis-10.3-159.x86_64 ===
    yast2-theme-openSUSE-2.15.14-4.noarch provides yast2-theme-openSUSE == 2.15.14-4, but is scheduled to be uninstalled.
    yast2-theme-openSUSE-2.15.14-4.noarch[1] provides yast2-theme-openSUSE == 2.15.14-4, but it is uninstallable.  Try installing it on its own for more details.
    pattern:yast2_basis-10.3-159.x86_64 depends on yast2-theme-openSUSE
    pattern:yast2_basis-10.3-159.x86_64 is lacking the requirement yast2-theme-openSUSE

>!>    Solution:
>!>       delete yast2_basis
>!>       delete pattern:yast2_basis-10.3-159.x86_64
>!>    Solution:
>!>       Ignore this requirement just here
>!>       


This is also shown in the y2log files. The solver does not come to a solution.
Jano, do you know why zypper want's to remove this package at once ?
Comment 9 Jan Kupec 2007-11-05 18:25:06 UTC
No clue. This is what zypper calls:

bool resolve()
{
  establish ();
  cout_v << _("Resolving dependencies...") << endl;
  God->resolver()->setForceResolve( true );
  return God->resolver()->resolvePool();
}

If this returns true, it proceeds to showing the summary. If false, it displays solver problems and proceeds only if a solution was finally found. Nevertheless, in this case it goes right to the summary, so i guess the solver _did_ find a solution.

Additionally, right before showing the summary, zypper log shows:

2007-11-05 19:12:05 <1> kompost(13023) [zypp] Resolver.cc(resolveDependencies):881 Resolver::resolveDependencies()
2007-11-05 19:12:05 <0> kompost(13023) [zypp] Resolver.cc(resolveDependencies):1057 Pend 1 / Cmpl 0 / Prun 0 / Defr 0 / Invl 0
2007-11-05 19:12:05 <0> kompost(13023) [zypp] QueueItemRequire.cc(process):775 Unfulfilled requirement '[package] (namedcap) yast2-theme-openSUSE'. trying different solution
2007-11-05 19:12:05 <0> kompost(13023) [zypp] Resolver.cc(resolveDependencies):1148 Pend 0 / Cmpl 1 / Prun 0 / Defr 0 / Invl 0
2007-11-05 19:12:05 <1> kompost(13023) [zypp] Resolver.cc(resolvePool):1357 Have solution, copying back to pool
Comment 10 Stefan Schubert 2007-11-06 08:26:41 UTC
Well, the reason is here:
"God->resolver()->setForceResolve( true );"
So, packages will be deleted which has unresolved dependencies.
If you set it to false, the error messages will be displayed as in the testcase described.
Comment 11 Jan Kupec 2007-11-06 15:15:57 UTC
indeed, when false, it correctly prompts for solution:

Solution 1: do not install yast2-theme-openSUSE-Crystal
  do not install yast2-theme-openSUSE-Crystal-2.15.14-16.noarch[factory]
 Solution 2: delete yast2-theme-openSUSE
  delete yast2-theme-openSUSE-2.15.14-4.noarch
 Solution 3: Ignore this conflict of yast2-theme-openSUSE-Crystal
Choose the number, (s)kip, (r)etry or (c)ancel>   

So i guess it's time to add an option to zypper which would enable us to turn the forceResolve on/off _and_ to rethink which mode do we want to be the default.

Since forceResolve == true is the default for rug/zmd, i guess that's why Martin (or Duncan?) decided to use this mode when writing zypper install.

I suggest to leave that as it is in rug compatibility mode, and use forceResolve == false in zypper by default, with an option to turn it on (e.g., somewhat surprisingly, --force-resolution :O).
Comment 12 Jan Kupec 2007-11-09 14:24:34 UTC
Done as suggested in the previous comment. Will be submitted in zypper 0.9.2