Repository sync for ubuntu repository is failing - KeyError: 'Packages.gz'

This document (000019879) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Manager 4.1 Server

Situation

Trying to sync custom ubuntu repositories with:
spacewalk-repo-sync
is failing.

Here's an example of a test run:
suma4: # spacewalk-repo-sync -c ubuntuextra --type deb -n -vvv
13:05:35 ======================================
13:05:35 | Channel: ubuntuextra
13:05:35 ======================================
13:05:35 Sync of channel started.
13:05:37 Unhandled error occurred: 'Packages.gz'
13:05:37 Unexpected error: <class 'KeyError'>
13:05:37 Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/reposync.py", line 570, in sync
    client_key_file=client_key_file)
  File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/repo_plugins/deb_src.py", line 270, in __init__
    self.repo.verify()
  File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/repo_plugins/deb_src.py", line 121, in verify
    if not repo.DpkgRepo(self.url, self._get_proxies(), self.gpg_verify).verify_packages_index():
  File "/usr/lib/python3.6/site-packages/spacewalk/common/repo.py", line 400, in verify_packages_index
    entry = self.get_release_index().get(name)
  File "/usr/lib/python3.6/site-packages/spacewalk/common/repo.py", line 76, in get
    return self[key]
KeyError: 'Packages.gz'

Resolution

On the Ubuntu server - run the following command in the directory of the repo to create a release file:
apt-ftparchive release . > Release

Afterwards, on the SUSE Manager Server, run again a sync of the repo to SUSE Manager with "spacewalk-repo-sync"

Cause

The Release file is missing. The sync code for ubuntu repos is expecting release infos to be there, but is not checked/reported as missing because Release info is interpreted as a flat repository.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019879
  • Creation Date: 07-May-2021
  • Modified Date:07-May-2021
    • SUSE Manager Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center