obs://openSUSE:Tools produces incorrect repository URL

When I follow https://en.opensuse.org/openSUSE:Git_Packaging_Workflow on LEAP 16.0, this command:

$ zypper ar -f obs://openSUSE:Tools tools

Guessed: platform = openSUSE_Leap_$releasever
Adding repository 'tools' ........................................................................................[done]
Repository 'tools' successfully added

URI         : https://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Leap_16.0
Enabled     : Yes
GPG Check   : Yes
Autorefresh : Yes
Priority    : 99 (default priority)

Produces non-existent repository path, because:

  • openSUSE_Leap_16.0 no longer exists
  • just 16.0 exists

… on https://download.opensuse.org/repositories/openSUSE:/Tools/

So following refresh will fail:

$ zypper ref
Repository 'Filesystem tools and FUSE-related packages (16.0)' is up to date.                                           
Repository 'repo-openh264 (16.0)' is up to date.                                                                        
Repository 'repo-oss (16.0)' is up to date.                                                                             
Retrieving repository 'tools' metadata ..........................................................................[error]
Repository 'tools' is invalid.
[tools|https://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Leap_16.0] Failed to retrieve new repository metadata.
History:
 - [tools|https://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Leap_16.0] Repository type can't be determined.
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'tools' because of the above error.
Some of the repositories have not been refreshed because of an error.

The literal content in /etc/zypp/repos.d/tools.repo is:

[tools]
enabled=1
autorefresh=1
baseurl=https://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Leap_$releasever

Following one-lner fixes problem for me:

sed -i.rpmsave -e 's@/openSUSE_Leap_@/@' /etc/zypp/repos.d/tools.repo

Is there any way to notify OBS admins to fix that (no longer existent) URL?

Thanks!

I would create a Bugzilla ticket for zypper as it looks to me this problem is part of the zypper code base.

I was initially skeptical (that it was bug in zypper), but found this in its source code:

// zypper-1.14.94/src/utils/misc.cc
        else if ( platform == "Leap" && pdata.vendor() == "openSUSE" )                                                  
        {                                                                                                               
          // bsc#1187425 Hotfix                                                                                         
          platform = "openSUSE_Leap_$releasever";                                                                       
        }          

So it really looks like bug in Zypper.

Reported here: https://bugzilla.opensuse.org/show_bug.cgi?id=1261549

1 Like