Bug 298859

Summary: YaST installer does not prefer PreRequired package
Product: [openSUSE] openSUSE 10.3 Reporter: Petr Mladek <pmladek>
Component: libzyppAssignee: Michael Andres <ma>
Status: RESOLVED WONTFIX QA Contact: Jiri Srain <jsrain>
Severity: Critical    
Priority: P5 - None CC: sbrabec
Version: Beta 1   
Target Milestone: ---   
Hardware: All   
OS: Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs

Description Petr Mladek 2007-08-09 14:39:04 UTC
There is the following cyclic dependency between the OpenOffice_org and OpenOffice_org-icon-themes package on 10.3-beta1:

OpenOffice_org.spec:
Requires:       %name-icon-themes

OpenOffice_org-i18n.spec:
%package -n OpenOffice_org-icon-themes
PreReq:         OpenOffice_org = %version


From some reasons, YaST installs the OpenOffice_org-icon-themes package first. So, it ignores the PreReq tag. As the result, the compat symlinks are not created and OOo does not have icons, see the bug #296502.

Note: I am going to fix OOo to do not resist on the compat symlinks. So, the bug #296502 does not depend on this one.
Comment 1 Petr Mladek 2007-08-09 14:40:25 UTC
Created attachment 156519 [details]
y2logs
Comment 2 Ladislav Slezák 2007-08-10 06:41:22 UTC
Problem in the solver or in the ordering of packages... Schubi?
Comment 4 Michael Andres 2007-08-27 13:41:59 UTC
No. As Petr wrote, the problem are cyclic dependencies. The package specs are broken. 

If we don't ignore the 'PreReq', we had to ignore the 'Requires'. The package mainatiner might be able to tell what's less bad, but not zypp.

(and "No", there is no general rule telling that ignoring a 'Requires' is less bad then ignoring a 'PreReq').

-> assign to maintainer to fix the package.
Comment 5 Petr Mladek 2007-08-27 14:35:40 UTC
I am sorry, I do not agree. PreReq has higher priority during installation by definition. It was introduced because of cyclic dependencies. It tells the installer that such dependency must be fulfilled first.

The meaning is the following. You have to satisfy the PreReq dependencies to install the package correctly (to run the stuff in %post scripts). You have to satisfy the Requires dependencies to use the package.

The Requires dependency might be ignored until you use the package. Most packages are not used during installation. The packages used during installation should be in PreReq of another package.

Please, do not reassign it back to me. OOo does not longer have the cyclic dependency. Though, this bug is still valid. zypp should prefer the PreReq over the Requires, definitely.
Comment 6 Michael Andres 2007-08-27 18:56:10 UTC
NO: PreReq were not introduced because of cyclic dependencies. It is not a hint indicating that one package should be installed before an other. 


'PreReq OpenOffice_org' says: OpenOffice_org must be usable(!) in order to install OpenOffice_org-icon-themes. 

Being usable means, OpenOffice_org AND ALL it's REQUIREMENTS(recursively!) must be installed. I.e. a complete system being able to run each binary included in 
OpenOffice_org must be installed before we can install openOffice_org-icon-themes. 

And OpenOffice_org requires this system to include openOffice_org-icon-themes.


As the cyclic dependencies prevent us from finding a legal solution, we 
have to violate some dependency. From zypps point of view there is no guarantee that dropping the requirement would have lead to a successful installation of openOffice_org-icon-themes. You as maintainer know that it would have worked, but zypp does not know which parts of OpenOffice_org are actually used at openOffice_org-icon-themes installtime. We guess (unfortunately nobody recognizes if we do a good guess). 


Only fixing the packages fixes the problem.
Comment 7 Petr Mladek 2007-08-28 12:36:47 UTC
You are right. I feel shame that I have written the broken idea. I wonder where I got it. I am sorry for the confusion. Thanks for great explanation.