Bug 659494

Summary: zypper ref loops forever
Product: [openSUSE] openSUSE 11.4 Reporter: Jiri Slaby <jslaby>
Component: Live MediumAssignee: Stephan Kulow <coolo>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: coolo, ma, sndirsch
Version: Factory   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: zypper.log

Description Jiri Slaby 2010-12-14 22:26:45 UTC
If I run zypper ref, it spins without progress or any output. I don't know what to attach. strace, ltrace?

$ rpm -q `rpmqpack|grep zypp |sort`
libzypp-8.10.2-2.1.x86_64
zypper-1.5.2-2.1.x86_64
Comment 1 Jiri Slaby 2010-12-14 22:31:13 UTC
Whateber zypper command I try to run, it just spins.
$ zypper -vvvvvvv lr
Verbosity: 7
^C^C
OK OK! Exiting immediately...
Comment 2 Jan Kupec 2010-12-15 12:34:09 UTC
please, take a look at /var/log/zypper.log, are there any ever-repeating patterns? What are the last lines when it hangs? (you can also attach it if it's not too big)
Comment 3 Jiri Slaby 2010-12-15 23:24:25 UTC
Created attachment 405024 [details]
zypper.log

500k of text generated in 2s. Attached as "big file".
Comment 4 Michael Andres 2010-12-16 11:22:59 UTC
Looks like it's exporting the keyring over and over again. I guess due to Dominiks changes in libzypp (commit c48330).

@Dominik: If Target is not up, you should do the manual rpmdb init attempt only once and cache the result.
Comment 5 Michael Andres 2010-12-16 18:45:31 UTC
Apart from the above flaw (no hang, but loops quite a while), the actual reason why the required data can't be found is probably the live installer. It looks like the /etc/products.d/baseproduct symlink is not created:

  $ ll /etc/products.d/baseproduct 
  lrwxrwxrwx .... /etc/products.d/baseproduct -> openSUSE.prod


WORKAROUND: manually create the missing symlink:

  ln -s openSUSE.prod /etc/products.d/baseproduct



libzypp-8.10.3 will be fixed to do just a quick init. But the installer should also be fixed to create the link.

-> reassigning
Comment 6 Jiri Slaby 2010-12-17 09:23:15 UTC
(In reply to comment #5)
> WORKAROUND: manually create the missing symlink:
> 
>   ln -s openSUSE.prod /etc/products.d/baseproduct

It works for me, thanks.
Comment 7 Stephan Kulow 2010-12-17 11:18:04 UTC
I fix that in openSUSE-release and hope that's ok
Comment 8 Stefan Dirsch 2011-01-03 13:36:37 UTC
Creating the symlink works for me as well.
Comment 9 Stephan Kulow 2011-01-03 16:30:03 UTC
symlink is in the package