From ca4c8a53c024c122a1a25b0d8b34dfb095bc3836 Mon Sep 17 00:00:00 2001 From: Ina Panova Date: Thu, 29 Apr 2021 11:02:12 +0200 Subject: [PATCH] Fixed Debian importer migration on a re-run. closes #8653 --- CHANGES/8653.bugfix | 1 + pulp_2to3_migration/app/plugin/deb/repository.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 CHANGES/8653.bugfix diff --git a/CHANGES/8653.bugfix b/CHANGES/8653.bugfix new file mode 100644 index 00000000..800d99b4 --- /dev/null +++ b/CHANGES/8653.bugfix @@ -0,0 +1 @@ +Fixed Debian importer migration on a re-run. diff --git a/pulp_2to3_migration/app/plugin/deb/repository.py b/pulp_2to3_migration/app/plugin/deb/repository.py index b0950558..1852c92a 100644 --- a/pulp_2to3_migration/app/plugin/deb/repository.py +++ b/pulp_2to3_migration/app/plugin/deb/repository.py @@ -33,7 +33,6 @@ 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: @@ -41,7 +40,7 @@ def migrate_to_pulp3(cls, pulp2importer): 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):