So there are a good number of threads for zypper/yast hanging up in the middle of various actions, but none were relevant to my particular problem, so throwing this out into the googlespace for the next person who might end up facing my problem.
The Symptoms: Yast Software Manager and Zypper would randomly freeze and stay frozen apparently indefinitely – at least for hours. The freeze occurs seemingly randomly in the midst of any action that may require downloading – including refreshing repositories and actually downloading packages/updates.
What is happening: Staring at zypper output on -vv I began noticing that it always hangs up when trying to download something from download.opensuse.org. It doesn’t do so consistently: most of the time the download happens, but sometimes it doesn’t and it freezes forever – but always when attempting to download from download.opensuse.org. With some research I found out that download.opensuse.org isn’t actually a centralized download repository but uses something called mirrorbrain that transparently redirects you to a chosen download mirror. So it would appear that one of those mirrors were having trouble with me – perhaps my IP is somehow blacklisted by that server. What’s confounding is that it doesn’t seem to be able to flag an error or at least timeout so I can be served another mirror or simply retry – it just goes on staying stuck forever.
Solution: With the hypothesis that one of the mirrors is somehow rejecting me in this inexplicable way, a direct solution would be to simply find a mirror that is happy with me, and force zypper/yast to use it. For core OpenSUSE packages (distribution and update), a list of mirros is available here. For the repositories at http://download.opensuse.org/repositories/ though, I couldn’t find a mirror list. Instead, I discovered that when you open the listing of packages on a browser, for eg here, you can click on ‘details’ next to any package and that shows a list of mirrors you can get the package from.
So armed with this knowledge, I simply went through all my enabled repositories, looked for all repositories that have download.opensuse.org as source, and replaced the url with that of a specific mirror. After that zypper and yast operated without problems.
Of course, this is a non-optimal set up, so after a while you might consider switching back to download.opensuse.org and see if the problem has gone away.
Or not.
Recent Comments
SMB Business Solution
"At SMB Business Solution, we offer Salesforce customization services to tailor your platform ..."
Marc Wayne Schechtel
"Das ist eine super hilfreiche Anleitung! Vielen Dank, dass du die Schritte so ..."
Hochzeitsplaner
"Great Article. Thanks "