What I need is, when the Backports are being downloaded from “download.opensuse.org” in the second stage, this step skip automatically, because my computer is in a local domain that does not reach that URL.
I never use ar or rr or mr with zypper. I simply change the content of /etc/zypp/repos.d/ to exclude *.repo files I don’t want enabled, and include those I do. I do this via simple filename changes with mc, to end or not with “o”. It’s quick and easy, very little typing involved.
Read documentation where id talks about setting ZYPP_LOCKFILE_ROOT to avoid it.
That’s bad idea. The repository definition will be installed again should package providing it be updated. This happens, even if not that often. Modified file will not be overwritten. Besides, are you sure repository numbers never change? Using names is less fragile.
Finally, as already mentioned, there is no need to use zypper, you can just edit repository definition directly.
Apart from the very obvious fact that this is about non-interactive installation so suggesting interactive tool means you did not even attempt to understand the question, renaming these particular repository definitions is bad idea as I already explained.
I don’t assume all OPs are clueless. Understanding how repo files are used, and renaming files with mv rather than zypper mr could conceivably avoid OP’s issue.
Explained where and when? Renames of /etc/zypp/repos.d/* has been SOP here for well over a decade. Files in /etc/zypp/repos.d/ not ending in *.repo IME are normally ignored by zypper and YaST, but may be discarded via an offline upgrade.
I do not mean renaming them. Just set to disabled.
andrei@leap154:~> cat /etc/zypp/repos.d/repo-sle-update.repo
[repo-sle-update]
name=Update repository with updates from SUSE Linux Enterprise 15
enabled=1
Package management ignores /etc/zypp/repos.d/ files that do not end in .repo, effectively disabling them. Andrei’s method is the official method. I do it my way to keep the file file content unmodified and thus the timestamp unmodified, so that I may know by viewing a directory list whether all is as I left it:
# ls -gG /etc/zypp/repos.d/*.repo
-rw-r--r-- 1 176 Jun 10 2020 /etc/zypp/repos.d/FCL.repo
-rw-r--r-- 1 219 Jun 8 2022 /etc/zypp/repos.d/KDE3.repo
-rw-r--r-- 1 153 Jun 8 2022 /etc/zypp/repos.d/NonOSS.repo
-rw-r--r-- 1 143 Jun 8 2022 /etc/zypp/repos.d/OSS.repo
-rw-r--r-- 1 235 Jun 8 2022 /etc/zypp/repos.d/Packman.repo
-rw-r--r-- 1 270 Jun 8 2022 /etc/zypp/repos.d/PackmanE.repo
-rw-r--r-- 1 129 Jun 8 2022 /etc/zypp/repos.d/Update.repo
-rw-r--r-- 1 239 Jun 8 2022 /etc/zypp/repos.d/UpdateBP.repo
-rw-r--r-- 1 145 Jun 8 2022 /etc/zypp/repos.d/UpdateNonOSS.repo
-rw-r--r-- 1 135 Jun 8 2022 /etc/zypp/repos.d/UpdateSLE.repo
-rw-r--r-- 1 310 Apr 25 17:19 /etc/zypp/repos.d/homeBelphegorBelbelKDE3.repo
-rw-r--r-- 1 192 Feb 8 21:10 /etc/zypp/repos.d/openh264.repo
Jun 8 2022 is the date 15.4 was officially released.