zypper ref gives error "File '/content' not found"

Hello,

For a month now I have been unable to update repositories. I only have configured the standard ones, exactly as documented in the upgrade Wiki page. Any assistance would be appreciated.

zypper is version 1.12.27

Here are the details from “zypper -q ref”:

File '/content' not found on medium 'http://download.opensuse.org/tumbleweed/repo/debug'

Abort, retry, ignore? [a/r/i/? shows all options] (a): Cannot read input: bad stream or EOF.
Error retrieving metadata for 'repo-debug':
Cannot read input. Bad stream or EOF.
Skipping repository 'repo-debug' because of the above error.
File '/content' not found on medium 'http://download.opensuse.org/tumbleweed/repo/non-oss'


Abort, retry, ignore? [a/r/i/? shows all options] (a): Cannot read input: bad stream or EOF.
Error retrieving metadata for 'repo-non-oss':
Cannot read input. Bad stream or EOF.
Skipping repository 'repo-non-oss' because of the above error.
File '/content' not found on medium 'http://download.opensuse.org/tumbleweed/repo/oss'


Abort, retry, ignore? [a/r/i/? shows all options] (a): Cannot read input: bad stream or EOF.
Error retrieving metadata for 'repo-oss':
Cannot read input. Bad stream or EOF.
Skipping repository 'repo-oss' because of the above error.
Some of the repositories have not been refreshed because of an error.

And for reference, “zypper lr -u” gives:

# | Alias            | Name             | Enabled | GPG Check | Refresh | URI                                                     --+------------------+------------------+---------+-----------+---------+---------------------------------------------------------
1 | repo-debug       | repo-debug       | Yes     | ( p) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/debug      
2 | repo-non-oss     | repo-non-oss     | Yes     | ( p) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/non-oss    
3 | repo-oss         | repo-oss         | Yes     | ( p) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/oss        
4 | repo-src-non-oss | repo-src-non-oss | No      | ----      | Yes     | http://download.opensuse.org/tumbleweed/repo/src-non-oss
5 | repo-src-oss     | repo-src-oss     | No      | ----      | Yes     | http://download.opensuse.org/tumbleweed/repo/src-oss    
6 | repo-update      | repo-update      | Yes     | ( p) Yes  | Yes     | http://download.opensuse.org/update/tumbleweed/  

Please post the output of “zypper lr -d” (“details”).

It shouldn’t even look for /content, because that indeed does not exist.
I assume that your repo types are wrong. They should be “rpm-md”.

If that is the case, it looks like you might be right, wolfi323. Here is the output:

# | Alias            | Name             | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                      | Service--+------------------+------------------+---------+-----------+---------+----------+--------+----------------------------------------------------------+--------
1 | repo-debug       | repo-debug       | Yes     | (r ) Yes  | Yes     |   99     | yast2  | http://download.opensuse.org/tumbleweed/repo/debug       |        
2 | repo-non-oss     | repo-non-oss     | Yes     | (r ) Yes  | Yes     |   99     | yast2  | http://download.opensuse.org/tumbleweed/repo/non-oss     |        
3 | repo-oss         | repo-oss         | Yes     | (r ) Yes  | Yes     |   99     | yast2  | http://download.opensuse.org/tumbleweed/repo/oss         |        
4 | repo-src-non-oss | repo-src-non-oss | No      | ----      | Yes     |   99     | yast2  | http://download.opensuse.org/tumbleweed/repo/src-non-oss |        
5 | repo-src-oss     | repo-src-oss     | No      | ----      | Yes     |   99     | yast2  | http://download.opensuse.org/tumbleweed/repo/src-oss     |        
6 | repo-update      | repo-update      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/tumbleweed/          |        

I have not changed anything though, and it had always worked until a month ago.

The easiest way would be to remove the repos 1 - 5


zypper rr 1 2 3 4 5

and readd only the oss and non-oss repo, unless you are a tester/developer:


zypper ar -f -n OSS http://download.opensuse.org/tumbleweed/repo/oss OSS
zypper ar -f -n NON-OSS http://download.opensuse.org/tumbleweed/repo/non-oss NON-OSS

That way the repos will be rebuilt, and you’ll have the proper type repos, with recognizable repo names and aliases.

Current repository type is rpm-md. I believe for some time both were available and supported, not followed it closely, then it was switched to rpm-md only. The easiest fix is to remove them and re-add again which will probe type. Or you could edit files under /etc/zypp/repos.d directly and remove “type=yast2” line - on next refresh zypper should probe for correct type again.

What exactly is not recognizable in names and aliases now?

Yes.
rpm-md is used by other repos since a long time, only the main repos (OSS, NON-OSS, and the source/debug variants) were in yast2 format still. They have been switched to rpm-md now too.
I think the yast2 format is still supported, only the repos switched to rpm-md.

Actually, zypper should notice this and switch the type automatically meanwhile, but old versions didn’t which may lead to this if you haven’t updated for months and still had an older zypper when the switch happened…
There is a bug report about this problem btw:
http://bugzilla.opensuse.org/show_bug.cgi?id=1090505(in that case the reporter apparently used YaST->Online Update to update the system though, which doesn’t work at all on TW as there are no maintenance updates…)

I have not updated anything for a while, it is a private mainly file server so when everything works I like to just leave it alone. So I am sure you are correct about my copy of zypper being out of date, wolfi323.

But I used sed to simply change the files as arvidjaar suggested and everything is working again.

Many thanks to you all for the explanations. A good lesson to keep more on top of updates!