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

Commit

Permalink
Fixed migration of a distribution tree if it has a treeinfo and not .…
Browse files Browse the repository at this point in the history
…treeinfo

closes #6951

https://pulp.plan.io/issues/6951
  • Loading branch information
ipanova committed Aug 7, 2020
1 parent 8ec0360 commit 5a38499
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/6951.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed migration of a distribution tree if it has a treeinfo and not .treeinfo
2 changes: 1 addition & 1 deletion pulp_2to3_migration/app/plugin/rpm/pulp_2to3_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ def create_pulp3_content(self):
for namespace in namespaces:
treeinfo = PulpTreeInfo()
try:
treeinfo.load(f=os.path.join(self.pulp2content.pulp2_storage_path, '.treeinfo'))
treeinfo.load(f=os.path.join(self.pulp2content.pulp2_storage_path, namespace))
except FileNotFoundError:
continue
self.filename = namespace
Expand Down
1 change: 0 additions & 1 deletion pulp_2to3_migration/app/pre_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ def pre_migrate_distributor(repo_id, distributors, distributor_migrators, repo=N
'pulp2_repository': repo,
'pulp2_repo_id': repo_id,
'is_migrated': False})

if not created:
# if it was marked as such because it was not present in the migration plan
distributor.not_in_plan = False
Expand Down

0 comments on commit 5a38499

Please sign in to comment.