Zypper error : ./repo/repoindex.xml

Hello.
I use scripts to configure computer for a long time.
After updating my repositories on a new install of leap 15.5, by a script of mine, zypper return an error :

Refreshing service 'openSUSE'.
Problem retrieving the repository index file for service 'openSUSE':
File './repo/repoindex.xml' not found on medium 'dir:/usr/share/zypp/local/service/openSUSE?cookies=0'
Check if the URI is valid and accessible.

Yast GUI does not show expected repositories.

/etc/zypp/services.d/ : https://paste.opensuse.org/pastes/8002ee3eb820

/etc/zypp/repos.d : https://paste.opensuse.org/pastes/89d87c5ce47d

/usr/share/zypp/local/service/openSUSE/repo/ : https://paste.opensuse.org/pastes/ecfe3837338b

I have not found any folder with a name like cookies

That have worked for years.

Any help is urgently needed.

Thank you.

What’s the output of zypper lr -d?

Given the prefix of ‘dir:’, that tells me it’s a local installation resource, which is probably a repo that should be disabled post-installation.

“?cookies=0” is a URI parameter, not a part of the directory name.

 ---------------------------------------------------------------------------
user_install@15-3-G731GV-JC:~> zypper lr -d
#  | Alias                       | Name        | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                               | Service
---+-----------------------------+-------------+---------+-----------+---------+----------+--------+-----------------------------------------------------------------------------------+--------
 1 | openSUSE-Leap-15.5-1        | openSUSE--> | No      | ----      | ----    |  200     | rpm-md | hd:/?device=/dev/disk/by-id/usb-JetFlash_Transcend_8GB_AATB9BAB60MOFABC-0:0-part2 | 
 2 | repo-backports-debug-update | Update re-> | No      | ----      | ----    |  200     | NONE   | http://download.opensuse.org/update/leap/15.5/backports_debug/                    | 
 3 | repo-backports-update       | Update re-> | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/backports/                          | 
 4 | repo-debug                  | Debug Rep-> | No      | ----      | ----    |  200     | NONE   | http://download.opensuse.org/debug/distribution/leap/15.5/repo/oss/               | 
 5 | repo-debug-non-oss          | Debug Rep-> | No      | ----      | ----    |  200     | NONE   | http://download.opensuse.org/debug/distribution/leap/15.5/repo/non-oss/           | 
 6 | repo-debug-update           | Update Re-> | No      | ----      | ----    |  200     | NONE   | http://download.opensuse.org/debug/update/leap/15.5/oss/                          | 
 7 | repo-debug-update-non-oss   | Update Re-> | No      | ----      | ----    |  200     | NONE   | http://download.opensuse.org/debug/update/leap/15.5/non-oss/                      | 
 8 | repo-non-oss                | Non-OSS R-> | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.5/repo/non-oss/                 | 
 9 | repo-openh264               | Open H.26-> | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://codecs.opensuse.org/openh264/openSUSE_Leap/                                | 
10 | repo-oss                    | Main Repo-> | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.5/repo/oss/                     | 
11 | repo-sle-debug-update       | Update re-> | No      | ----      | ----    |  200     | NONE   | http://download.opensuse.org/debug/update/leap/15.5/sle/                          | 
12 | repo-sle-update             | Update re-> | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/sle/                                | 
13 | repo-source                 | Source Re-> | No      | ----      | ----    |  200     | NONE   | http://download.opensuse.org/source/distribution/leap/15.5/repo/oss/              | 
14 | repo-update                 | Main Upda-> | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/oss/                                | 
15 | repo-update-non-oss         | Update Re-> | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/non-oss/                            | 
user_install@15-3-G731GV-JC:~>

Can you show the output of

ls -Rl /usr/share/zypp/local/service/openSUSE

After reading a comment from you in a thread something similar on this forum, I have deleted
“/etc/zypp/services.d/openSUSE.service”.
Thing seems to run as before ( for the moment )

Thank you to confirm that I have well understood.

Thanks for helping

user_install@15-3-G731GV-JC:~> ls -Rl /usr/share/zypp/local/service/openSUSE
/usr/share/zypp/local/service/openSUSE:
total 4
drwxr-xr-x 2 root root 4096 31 mai 19:03 repo

/usr/share/zypp/local/service/openSUSE/repo:
total 4
-rw-r–r-- 1 root root 2697 29 mai 18:23 opensuse-leap-repoindex.xml
user_install@15-3-G731GV-JC:~>

Please use preformatted text tags </> to post terminal output.

You issue is/was, as already shown in the original error output, the missing “/repo/repoindex.xml”

On a proper openSUSE Leap system the repoindex.xml is a link to opensuse-leap-repoindex.xml

leaptest@test:~> ls -Rl /usr/share/zypp/local/service/openSUSE
/usr/share/zypp/local/service/openSUSE:
insgesamt 4
drwxr-xr-x 2 root root 4096 31. Mai 19:18 repo

/usr/share/zypp/local/service/openSUSE/repo:
insgesamt 4
-rw-r--r-- 1 root root 2557 31. Mai 19:18 opensuse-leap-repoindex.xml
lrwxrwxrwx 1 root root   27 31. Mai 19:03 repoindex.xml -> opensuse-leap-repoindex.xml

So you were simply missing the link. This should have been easily resolved by force reinstalling the package openSUSE-repos-Leap

(I edited your post to put the output in a code block; please do this in future when asked for terminal output so it’s more readable. :slight_smile: )

Yeah, I’d remove or disable repo #1, which is what the removal of that service file will have done.

Wrong. The service file comes from the package openSUSE-repos-Leap

leaptest@test:~> LANG=C sudo zypper se --provides /etc/zypp/services.d/openSUSE.service
Refreshing service 'openSUSE'.
Loading repository data...
Reading installed packages...

S  | Name                       | Summary                                | Type
---+----------------------------+----------------------------------------+--------
i+ | openSUSE-repos-Leap        | openSUSE package repositories          | package
   | openSUSE-repos-Leap-NVIDIA | openSUSE NVIDIA repository definitions | package


1 Like

Sorry, I forgot, I was in hurry.

Ah, I did miss that. Thanks for the correction.

I was looking for a non-http(s) repo that was enabled, as that also typically causes this type of issue (though more usually, now I think about it more clearly, it’s a ‘medium not found’ message rather than a ‘repoindex.xml not found’ - and I see that in jcdole’s list, it’s already disabled).

It is the service that should have triggered people. I am not sure I understand what it is or how it was added, but IMO it is the culprit.

There service is added (as already explained) by the package openSUSE-repos-Leap. It adds all repos which are available for the respective openSUSE flavor. So instead that you need to deal with 11 single repo URLs (for Leap), you only need to install 1 package which creates/adds all repos.

And the service is not the “culprit”. The “culprit” is the one which removed a file which is necessary to properly create the repos…

The openSUSE-repo-* packages are the new default if you don’t have customized repos or if you do a fresh installation.

Sorry, it is me, but I still do not understand much of this story. But it seems to me that the OP is hit by something where he is not guilty of doing something strange. Or am I wrong again here?

I don’t think it’s you. It used to be that on installation a set of standard repos was configured, and the admin was given options for more. After installation, repo management was left almost entirely up to the sysadmin. Relatively recently, the system got more involved, providing an optional repo management service that for some already existing installations was slipstreamed in without obvious notification, particularly systems with an NVidia component.

At first the best way I knew to keep control seemed to be purge the service if present, then purge and lock out openSUSE-repo*. It seems that isn’t enough any more. Now there’s a forced choice to be made between having openSUSE-release-15.6 installed, and not having the following installed:

repo-backports-debug-update.repo
repo-backports-update.repo
repo-sle-debug-update.repo
repo-sle-update.repo

That breaks my policy that disallows more than one instance of string repo in any repo’s filename. Fullpath filenames really don’t need three instances of string repo, and I don’t ever want to need to use them. For the time being I have the following empty immutable repo files:

# ls -Ggl repo*
-rw-r--r-- 1 0 May 24 00:53 repo-backports-debug-update.repo
-rw-r--r-- 1 0 May 24 00:53 repo-backports-update.repo
-rw-r--r-- 1 0 May 24 00:53 repo-sle-debug-update.repo
-rw-r--r-- 1 0 May 24 00:53 repo-sle-update.repo
# lsattr repo*
----i---------e------- repo-backports-debug-update.repo
----i---------e------- repo-backports-update.repo
----i---------e------- repo-sle-debug-update.repo
----i---------e------- repo-sle-update.repo
#

This reduces likelihood of: 1- duplication of already existing repo(s), and; 2-introduction of undesired repos.

Thanks for your extensive explanation indeed.

I am amazed about this. And can still not assess complete what it means. I am on Leap 15.5 and have now

boven:~ # zypper lr -d
#  | Alias                  | Name                                                        | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                      | Service
---+------------------------+-------------------------------------------------------------+---------+-----------+---------+----------+--------+--------------------------------------------------------------------------+--------
 1 | backports-debug-update | Updates for openSUSE Leap debuginfo from openSUSE Backports | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/update/leap/15.5/backports_debug/           | 
 2 | backports-update       | Updates from openSUSE Backports                             | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/backports/                 | 
 3 | libdvdcss              | Libdvdcss                                                   | No      | ----      | ----    |   99     | N/A    | http://opensuse-guide.org/repo/openSUSE_Leap_15.5/                       | 
 4 | main                   | Main (OSS)                                                  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.5/repo/oss/            | 
 5 | main-debug             | Debug (OSS)                                                 | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/debug/distribution/leap/15.5/repo/oss/      | 
 6 | main-debug-update      | Update-Debug (OSS)                                          | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/debug/update/leap/15.5/oss/                 | 
 7 | main-source            | Source (OSS)                                                | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/source/distribution/leap/15.5/repo/oss/     | 
 8 | main-update            | Update (OSS)                                                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/oss                        | 
 9 | non-oss-debug          | Debug (Non-OSS)                                             | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/debug/distribution/leap/15.5/repo/non-oss/  | 
10 | non-oss-debug-update   | Update-Debug (Non-OSS)                                      | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/debug/update/leap/15.5/non-oss/             | 
11 | non-oss-main           | Main (Non-OSS)                                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.5/repo/non-oss/        | 
12 | non-oss-source         | Source (Non-OSS)                                            | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/source/distribution/leap/15.5/repo/non-oss/ | 
13 | non-oss-update         | Update (Non-OSS)                                            | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/non-oss/                   | 
14 | packman                | Packman                                                     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.5/      | 
15 | sle-debug-update       | Updates for debuginfo from SLE 15                           | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/debug/update/leap/15.5/sle/                 | 
16 | sle-update             | Updates from SLE 15                                         | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/sle/                       | 
boven:~ # 

As you can see I do manage my repos. Like you I find it ridiculous that a list of repositories has three or four times the string ‘repo’ in it so we are pretty sure they are repos. (I may be dumb, but not that dumb). Also it is clear that Alias should be a short (but still unique and clear) indication of a repo to be used in terminal commands (and not endless strings, I saw even URLs used for Aliases :frowning: ).

But from your story it seems that “they” are trying to intervene with this? On 15.6, but apparently also on 15.5 (i did not see anything until now on 15.5 BTW)?

It looks that at least I should take care and inspect my repo definitions on a regular base to prevent disaster. :frowning:

Very interesting comments.

One remark. During my previous install of 15.5, I never asked to install any kind of ‘openSUSE-repos-Leap*’

Yesterday evening I just reinstall 15.5.

Installation without additional repos . Skip this step during install.
reboot
run zypper up (nearly 900 packages updated or new installed)
reboot
user_install@15-3-G731GV-JC:~> cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.5"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.5"
PRETTY_NAME="openSUSE Leap 15.5"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.5"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap"
LOGO="distributor-logo-Leap"

user_install@15-3-G731GV-JC:~> uname -a
Linux 15-3-G731GV-JC 5.14.21-150500.55.65-default #1 SMP PREEMPT_DYNAMIC Thu May 23 04:57:11 UTC 2024 (a46829d) x86_64 x86_64 x86_64 GNU/Linux

1°) lr -d show the same things
2°)

user_install@15-3-G731GV-JC:~> ls -Rl /usr/share/zypp/local/service/openSUSE
ls: cannot access '/usr/share/zypp/local/service/openSUSE': No such file or directory

There is only a folder schema :

user_install@15-3-G731GV-JC:~> ls -Rl /usr/share/zypp
/usr/share/zypp:
total 4
drwxr-xr-x 3 root root 4096 Apr 22 06:13 schema

/usr/share/zypp/schema:
total 4
drwxr-xr-x 2 root root 4096 May 31 22:46 yum

/usr/share/zypp/schema/yum:
total 76
-rw-r--r-- 1 root root 3825 Dec 19 10:10 common-inc.rng
-rw-r--r-- 1 root root 1546 Jul 19  2023 deltainfo.rng
-rw-r--r-- 1 root root 1145 Jul 19  2023 filelists.rng
-rw-r--r-- 1 root root  981 Jul 19  2023 other.rng
-rw-r--r-- 1 root root  968 Jul 19  2023 patches.rng
-rw-r--r-- 1 root root 8466 Jul 19  2023 patch.rng
-rw-r--r-- 1 root root 2522 Jul 19  2023 patterns.rng
-rw-r--r-- 1 root root 6543 Jul 19  2023 primary.rng
-rw-r--r-- 1 root root 1534 Jul 19  2023 product.rng
-rw-r--r-- 1 root root 1010 Jul 19  2023 products.rng
-rw-r--r-- 1 root root 2354 Jul 19  2023 repomd.rng
-rw-r--r-- 1 root root 2584 Jul 19  2023 rpm-inc.rng
-rw-r--r-- 1 root root 2015 Jul 19  2023 susedata.rng
-rw-r--r-- 1 root root  839 Jul 19  2023 suseinfo.rng
-rw-r--r-- 1 root root 4520 Jul 19  2023 updateinfo.rng

3°)

user_install@15-3-G731GV-JC:~> LANG=C sudo zypper se --provides /etc/zypp/services.d/openSUSE.service
Loading repository data...
Reading installed packages...

S | Name                       | Summary                                | Type
--+----------------------------+----------------------------------------+--------
  | openSUSE-repos-Leap        | openSUSE package repositories          | package
  | openSUSE-repos-Leap-NVIDIA | openSUSE NVIDIA repository definitions | package

openSUSE-repos-Leap* not installed.

Question :
How to stay in that situation and have the opensuse service unused.

user_install@15-3-G731GV-JC:~> sudo ls -Ggl repo*
[sudo] password for root: 
ls: cannot access 'repo*': No such file or directory
user_install@15-3-G731GV-JC:~> lsattr repo*
lsattr: No such file or directory while trying to stat repo*

From where did you run these command ?

/etc/zypp/repos.d/ is the logical way, as that’s the location repos are kept. I initially tried to do it from my LAN server’s repo template directory, a location which doesn’t relate to their installed location, but there the immutable flag is inappropriate.

Preventing installation of openSUSE-repos* will prevent most unrequested repos from being added:

sudo zypper al openSUSE-repos*

The most rather than all problem is that the four I listed are now included in openSUSE-release-15.?, not a package that makes any sense to lock AFAICT. Thus, whenever that package is reinstalled or upgraded, they appear in /etc/zypp/repos.d/, which is why I have emptied them and made them immutable. The files exist, but produce nothing.

Making files immutable is beyond the POSIX standard I assume. This it may not be implemented in all types of file system.