Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Respect optional APT remote fields
Browse files Browse the repository at this point in the history
  • Loading branch information
quba42 authored and goosemania committed Apr 29, 2021
1 parent c905641 commit 5239f8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/8613.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed migration of Pulp 2 deb importers without configured components or architectures
8 changes: 6 additions & 2 deletions pulp_2to3_migration/app/plugin/deb/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ def migrate_to_pulp3(cls, pulp2importer):
base_config, name = cls.parse_base_config(pulp2importer, pulp2_config)
base_config['name'] = name
base_config['distributions'] = pulp2_config.get('releases').replace(',', ' ')
base_config['components'] = pulp2_config.get('components').replace(',', ' ')
base_config['architectures'] = pulp2_config.get('architectures').replace(',', ' ')
components = pulp2_config.get('components')
if components:
base_config['components'] = components.replace(',', ' ')
architectures = pulp2_config.get('architectures')
if architectures:
base_config['architectures'] = architectures.replace(',', ' ')
return AptRemote.objects.update_or_create(**base_config)


Expand Down

0 comments on commit 5239f8a

Please sign in to comment.