Bug 1215790

Summary: zypper reports Repository already exists
Product: [openSUSE] openSUSE Distribution Reporter: Gerben Jansen <gerben.jansen>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: bzeller
Version: Leap 15.5   
Target Milestone: ---   
Hardware: x86   
OS: openSUSE Leap 15.5   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Zypper log of failing "zypper -vv up" command

Description Gerben Jansen 2023-09-28 07:21:42 UTC
Created attachment 869806 [details]
Zypper log of failing "zypper -vv up" command

When i try to upgrade software zypper reports that a repository already exists:

# ZYPP_LOGFILE=/tmp/zypper.log zypper -vv up
Verbosity: 3
Initializing Target
Refreshing service 'NVIDIA'.
Refreshing service 'openSUSE'.
Adding repository 'repo-oss (15.5)' .................................................................................................................[error]
Unexpected exception.
[openSUSE:repo-oss|http://download.opensuse.org/distribution/leap/15.5/repo/oss] Repository already exists.
Please file a bug report about this.
See http://en.opensuse.org/Zypper/Troubleshooting for instructions.


# zypper repos
Repository priorities in effect:                                                                                            (See 'zypper lr -P' for details)
      90 (raised priority)  :  2 repositories
      99 (default priority) :  8 repositories

#  | Alias                           | Name                          | Enabled | GPG Check | Refresh
---+---------------------------------+-------------------------------+---------+-----------+--------
 1 | NVIDIA:repo-non-free            | repo-non-free (15.5)          | Yes     | (r ) Yes  | Yes
 2 | openSUSE-Leap-15.5-1            | openSUSE-Leap-15.5-1          | No      | ----      | ----
 3 | openSUSE:repo-non-oss           | repo-non-oss (15.5)           | Yes     | (r ) Yes  | Yes
 4 | openSUSE:repo-non-oss-debug     | repo-non-oss-debug (15.5)     | No      | ----      | ----
 5 | openSUSE:repo-openh264          | repo-openh264 (15.5)          | Yes     | (r ) Yes  | Yes
 6 | openSUSE:repo-oss               | repo-oss (15.5)               | Yes     | (r ) Yes  | Yes
 7 | openSUSE:repo-oss-debug         | repo-oss-debug (15.5)         | No      | ----      | ----
 8 | openSUSE:repo-oss-source        | repo-oss-source (15.5)        | No      | ----      | ----
 9 | openSUSE:update-backports       | update-backports (15.5)       | Yes     | (r ) Yes  | Yes
10 | openSUSE:update-backports-debug | update-backports-debug (15.5) | No      | ----      | ----
11 | openSUSE:update-non-oss         | update-non-oss (15.5)         | Yes     | (r ) Yes  | Yes
12 | openSUSE:update-non-oss-debug   | update-non-oss-debug (15.5)   | No      | ----      | ----
13 | openSUSE:update-oss             | update-oss (15.5)             | Yes     | (r ) Yes  | Yes
14 | openSUSE:update-oss-debug       | update-oss-debug (15.5)       | No      | ----      | ----
15 | openSUSE:update-sle             | update-sle (15.5)             | Yes     | (r ) Yes  | Yes
16 | openSUSE:update-sle-debug       | update-sle-debug (15.5)       | No      | ----      | ----
17 | packman                         | packman                       | Yes     | (r ) Yes  | Yes
18 | snappy                          | snappy                        | Yes     | (r ) Yes  | Yes


# rpm -q libzypp zypper
libzypp-17.31.20-150400.3.40.1.x86_64
zypper-1.14.63-150400.3.29.1.x86_64


How do i fix this ?
Comment 1 Gerben Jansen 2023-09-28 07:23:37 UTC
See also https://forums.opensuse.org/t/i-cant-shutdown-my-system-with-kde-and-halt-p/169383/7 where i got into this situation.
Comment 2 Benjamin Zeller 2023-09-29 07:33:15 UTC
Before adding the service did you have already a repository named openSUSE:repo-non-oss ?

Seems to me like the service was added without removing the already existing repos
Comment 3 Gerben Jansen 2023-09-29 12:56:43 UTC
I found the reason for this error message:
   the recent Leap upgrade from 15.4 to 15.5 installed the openSUSE-repos-Leap package which conflicts with the already installed repositories.

Uninstalling openSUSE-repos-Leap (and openSUSE-repos-Leap-NVIDIA which requires it) resolved my issue.

So as far as i am concerned you can ignore this bug.
Comment 4 Benjamin Zeller 2023-10-02 11:16:42 UTC
Closing as invalid.