Bug 225484

Summary: YaST User-management fails several times if software-management is running
Product: [openSUSE] openSUSE 10.2 Reporter: Forgotten User --EoyBps8f <forgotten_--EoyBps8f>
Component: YaST2Assignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: jsuchome, scott
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Patch for PackageSystem.ycp

Description Forgotten User --EoyBps8f 2006-12-01 19:13:29 UTC
Start user-management and software-management (YaST's). Now choose "Options for experts" and pick "Authentication and user-sources".

YaST tells me that it cannot access the software-management, because it is already running. I am not sure if this is really necessary, but fair enough, apparently that part of the module depends on some RPMs that have to be checked each time.

However, after this first notification, YaST does not simply abort the "Authentication and user-sources" but tries to start it nevertheless. This results in several notifications with a pause of ~2 minutes inbetween.

After those notifications and empty window is displayed.

Expected behaviour would be that either that bit does not depend on any software-management, or at least just notifies the user that it needs software-management and does not try to start the module anyway.
Comment 1 Matej Horvath 2006-12-02 21:03:11 UTC
Please attach your yast log files.
http://en.opensuse.org/Bugs/YaST

Thank you.
Comment 2 Forgotten User --EoyBps8f 2006-12-02 21:08:55 UTC
So you cannot re-produce it?
Comment 3 Forgotten User --EoyBps8f 2006-12-04 10:23:59 UTC
It is really a bad habit to use more keystrokes in order to request logs instead of just trying to re-produce the bug with only five clicks. If this was something more complicated to re-produce, fair enough, but it is too easy.

If you cannot re-produce it, mark it as invalid. I do not use that feature and just discovered the bug by chance.
Comment 5 Jiří Suchomel 2006-12-05 08:29:51 UTC
Logs are not needed, I can reproduce it.

The problem is in multiple call of Package::Available (it is called for each involved module: yast2-nis-client, ldap-client, samba-client). It fails, because it cannot access the source, but only returns boolean value so yast2-users cannot know it shouldn't call this function again.

Ladislav, what could we do here? Could I query bindings somehow to get the information about the lock/unavalability so I would omit Package::Available calls?
Or should the bindings cache the information inside so the next call can return the result more quickly?
Comment 8 Ladislav Slezák 2007-02-22 12:02:37 UTC
You can check if the package manager is available by explicit call Pkg::Connect() (or even better by PackageLock::Check()). Call this function before any other Pkg:: call.

Failed connection to libzypp must be handled in YCP scripts.
Comment 9 Jiří Suchomel 2007-02-22 12:22:12 UTC
:-( but it is not sufficient because the problem occurs when the source is not accesible and PackageLock::Check() doesn't check this.
Comment 10 Ladislav Slezák 2007-02-22 13:34:44 UTC
Created attachment 120528 [details]
Patch for PackageSystem.ycp

Patch: PackageSystem::Available() returns nil if there is no installation source available.
Comment 11 Jiří Suchomel 2007-02-22 14:35:00 UTC
yast2-users-2.15.13 check possible nil result of Package::Available call.
Comment 12 Ladislav Slezák 2007-02-23 12:07:10 UTC
Package::Available() has been fixed in yast2-packager-2.15.17
Comment 13 Jiří Suchomel 2007-04-20 08:52:51 UTC
*** Bug 263664 has been marked as a duplicate of this bug. ***
Comment 14 Scott Couston 2007-04-21 08:19:54 UTC
Re comment #3. Thank you Steve for your common sense approach and look forward to 10,3