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

Commit

Permalink
Fixed Debian importer migration on a re-run.
Browse files Browse the repository at this point in the history
closes #8653
  • Loading branch information
ipanova authored and goosemania committed May 3, 2021
1 parent 5239f8a commit ca4c8a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/8653.bugfix
@@ -0,0 +1 @@
Fixed Debian importer migration on a re-run.
3 changes: 1 addition & 2 deletions pulp_2to3_migration/app/plugin/deb/repository.py
Expand Up @@ -33,15 +33,14 @@ def migrate_to_pulp3(cls, pulp2importer):
"""
pulp2_config = pulp2importer.pulp2_config
base_config, name = cls.parse_base_config(pulp2importer, pulp2_config)
base_config['name'] = name
base_config['distributions'] = pulp2_config.get('releases').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)
return AptRemote.objects.update_or_create(name=name, defaults=base_config)


class DebDistributor(Pulp2to3Distributor):
Expand Down

0 comments on commit ca4c8a5

Please sign in to comment.