Zypper migration fails for SLES 15 SP4 to SP5 upgrade

Hi,

I get the following error message when I try to upgrade with ‘zypper migration’:

[...]
Executing '/usr/bin/zypper --xmlout --no-refresh --non-interactive search -s --match-exact -t product sle-module-development-tools'

command '/usr/bin/zypper --xmlout --no-refresh --non-interactive search -s --match-exact -t product sle-module-development-tools' failed
Error: zypper returned 106 with '<?xml version='1.0'?>
<stream>
<progress id="52" name="Building repository &apos;SLE-Module-Packagehub-Subpackages15-SP5-Pool&apos; cache"/>
<progress id="52" name="Building repository &apos;SLE-Module-Packagehub-Subpackages15-SP5-Pool&apos; cache" value="0"/>
<progress id="52" name="Building repository &apos;SLE-Module-Packagehub-Subpackages15-SP5-Pool&apos; cache" value="100"/>
<progress id="52" name="Building repository &apos;SLE-Module-Packagehub-Subpackages15-SP5-Pool&apos; cache" value="100"/>
<progress id="52" name="Building repository &apos;SLE-Module-Packagehub-Subpackages15-SP5-Pool&apos; cache" done="1"/>
<progress id="57" name="Building repository &apos;SLE-Module-Packagehub-Subpackages15-SP5-Updates&apos; cache"/>
<progress id="57" name="Building repository &apos;SLE-Module-Packagehub-Subpackages15-SP5-Updates&apos; cache" value="0"/>
<progress id="57" name="Building repository &apos;SLE-Module-Packagehub-Subpackages15-SP5-Updates&apos; cache" value="100"/>
<progress id="57" name="Building repository &apos;SLE-Module-Packagehub-Subpackages15-SP5-Updates&apos; cache" done="1"/>
<message type="info">
New repository or package signing key received:

&lt;gpgkey-info&gt;&lt;repository&gt;SUSE-PackageHub-15-SP5-Backports-Pool&lt;/repository&gt;&lt;key-name&gt;openSUSE:Backports OBS Project &amp;lt;openSUSE:Backports@build.opensuse.org&amp;gt;&lt;/key-name&gt;&lt;key-fingerprint&gt;F044C2C507A1262B538AAADD8A49EB0325DB7AE0&lt;/key-fingerprint&gt;&lt;key-algorithm&gt;RSA 4096&lt;/key-algorithm&gt;&lt;key-created time_t=&quot;1683729972&quot; text=&quot;2023-05-10T14:46:12Z&quot;/&gt;&lt;key-expires time_t=&quot;1809873972&quot; text=&quot;2027-05-09T14:46:12Z&quot;/&gt;&lt;rpm-name&gt;gpg-pubkey-25db7ae0-645bae34&lt;/rpm-name&gt;&lt;/gpgkey-info&gt;
</message>
<message type="info">    Note: Signing data enables the recipient to verify that no modifications occurred after the data
    were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system
    and in extreme cases even to a system compromise.</message>
<message type="info">    Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key&apos;s name. If
    you are not sure whether the presented key is authentic, ask the repository provider or check
    their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they
    are using.</message>
<prompt id="14">
<text>Do you want to reject the key, trust temporarily, or trust always?</text>
<option default="1" value="r" desc="Don&apos;t trust the key."/>
<option value="t" desc="Trust the key temporarily."/>
<option value="a" desc="Trust the key and import it into trusted keyring."/>
</prompt>
<message type="error">Error building the cache:
[SUSE_Package_Hub_15_SP5_x86_64:SUSE-PackageHub-15-SP5-Backports-Pool|https://updates.suse.com/SUSE/Backports/SLE-15-SP5_x86_64/standard?bxhDhyt0H2USKRWLnQoNxhDqn5EHRqHd9P2H_8-dwGeB4MBtv3_LKjqiOx7h356VOGw4ns8D01HHTwGp1KMUhNwXtzFjlcwUw1hVYUn6BVuzGSS6qLRsO2Hj8-CY1iq3GssD3D3Gjc0] Valid metadata not found at specified URL
History:
 - Signature verification failed for repomd.xml
 - Can&apos;t provide /repodata/repomd.xml

</message>
<message type="warning">Skipping repository &apos;SUSE-PackageHub-15-SP5-Backports-Pool&apos; because of the above error.</message>
<progress id="65" name="Building repository &apos;SUSE-PackageHub-15-SP5-Pool&apos; cache"/>
<progress id="65" name="Building repository &apos;SUSE-PackageHub-15-SP5-Pool&apos; cache" value="0"/>
<progress id="65" name="Building repository &apos;SUSE-PackageHub-15-SP5-Pool&apos; cache" value="100"/>
<progress id="65" name="Building repository &apos;SUSE-PackageHub-15-SP5-Pool&apos; cache" done="1"/>
<message type="error">Some of the repositories have not been refreshed because of an error.</message>
<message type="info">Loading repository data...</message>
<message type="info">Reading installed packages...</message>

<search-result version="0.0">
<solvable-list>
<solvable status="installed" name="sle-module-development-tools" kind="product" edition="15.4-0" arch="x86_64" repository="(System Packages)"/>
</solvable-list>
</search-result>
</stream>' (exit status 106)

Migration failed.


Performing repository rollback...
[...]

The problem seems to be with the SLE-Module-Packagehub-Subpackages15.
‘SUSEConnect --status-text’ shows it as the only product not registered:

  Module to ship some SLE subpackages by PackageHub
  (sle-module-packagehub-subpackages/15.4/x86_64)

  Not Registered

I tried to remove it with yast, but that doesn’t work. It keeps coming back.

I also tried: ‘zypper migration --disable-repos’, but that doesn’t fix it either.

How do I resolve this?

@wvvelzen Hi and welcome to the Forum :smile:
So did you accept the new key from the new package hub repo?

I didn’t get that choice…

But after reading the zypper man page a bit: I’m going to try the upgrade later on (when the server is not busy) with the global option --gpg-auto-import-keys …

1 Like

Unfortunately that doesn’t work:

# zypper --gpg-auto-import-keys migration
Subcommand zypper-migration does not support zypper global options.
Type 'zypper help <COMMAND>' to get command-specific help.

# zypper migration --gpg-auto-import-keys

[...]

Executing '/usr/bin/zypper ref --gpg-auto-import-keys'

The flag --gpg-auto-import-keys is not known.
repository refresh failed, exiting
'/usr/lib/zypper/commands/zypper-migration' exited with status 1

Today there was a “regular” update for SLES 15.4, that installed this update:

2023-10-18 11:59:34|install|PackageHub-release|15.4-150400.3.1|x86_64||SUSE_Package_Hub_15_SP4_x86_64:SUSE-PackageHub-15-SP4-Pool|[...]|
# 2023-10-18 11:59:34 /var/adm/update-scripts/PackageHub-release-15.4-150400.3.1-install-rpm-key.sh executed
# /usr/lib/rpm/gnupg/keys/gpg-pubkey-65176565-59787af5.asc: OK
# Importing Package Hub community key...
# /usr/lib/rpm/gnupg/keys/gpg-pubkey-25db7ae0-645bae34.asc: OK
# Importing new (2023) Package Hub community key...

Now the ‘zypper migration’ works without a hitch! :slight_smile:

So problem solved!