Bug 395333

Summary: community repositoriy not selected if called by yast2 piwo
Product: [openSUSE] openSUSE 11.0 Reporter: Thomas Göttlicher <tgoettlicher>
Component: YaST2Assignee: J. Daniel Schmidt <jdsn>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: coolo, jdsn, locilka, lslezak, tgoettlicher
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: screenshot
Patch for inst_suse_register.ycp
YaST log from piwo run
patch for inst_suse_register.ycp

Description Thomas Göttlicher 2008-05-29 08:39:20 UTC
Created attachment 218818 [details]
screenshot

The list of community repositories hasn't any items selected when called by 'yast2 piwo' even though repos are added to the system.
Comment 1 Lukas Ocilka 2008-05-29 09:07:36 UTC
Created attachment 218821 [details]
Patch for inst_suse_register.ycp

Registration has to call
  Pkg::SourceRestore();
before registering a new source.
Comment 2 Lukas Ocilka 2008-05-29 09:13:04 UTC
Created attachment 218822 [details]
YaST log from piwo run

See the log file

registration:
  Pkg Builtin called: SourceGetCurrent
  Current sources: [0, 1, 3, 4, 5]
  Registers a new source (update)
  Current sources: [1, 3, 4, 5, 6]
  Pkg Builtin called: SourceFinishAll
  Pkg Builtin called: TargetFinish

comrepos:
  Pkg Builtin called: TargetInitialize
  Pkg Builtin called: SourceRestore
--> error
  Source_Load.cc(SourceRestore):57 Number of registered repositories: 7, skipping repository load!
  (But sources are already finished)
--> error
  Current sources: []

This seems to be error in package bindings
Comment 3 Lukas Ocilka 2008-05-29 09:13:59 UTC
Daniel, please, fix registration (patch) and reassign to lslezak.
Comment 4 J. Daniel Schmidt 2008-05-29 12:42:04 UTC
fixed in registration, will be submitted in a minute
lslezak, please take over for the other half
Comment 5 Ladislav Slezák 2008-05-29 14:37:28 UTC
Created attachment 218906 [details]
patch for inst_suse_register.ycp

The problem is that inst_suse_register.ycp calls Pkg::SourceFinishAll() which saves and _disables_ all sources.

It should call Pkg::SourceSaveAll() instead - it's similar to SourceFinishAll() but it doesn't disable sources. Repositories are then displayed with the correct state.
Comment 6 Thomas Göttlicher 2008-05-29 15:12:01 UTC
I've tested the patches. Works fine, thanks! 

Who submits a package while jdsn is on vacation?
Comment 7 Lukas Ocilka 2008-05-29 15:30:02 UTC
I can do that...
Comment 8 Lukas Ocilka 2008-05-29 15:38:00 UTC
- Lslezak's patch for inst_suse_register to save all sources but
  not to disable them (bnc #395333).
- yast2-registration-2.16.6
Comment 10 OBSbugzilla Bot 2020-10-27 10:10:53 UTC
This is an autogenerated message for OBS integration:
This bug (395333) was mentioned in
https://build.opensuse.org/request/show/844234 Factory / yast2-registration