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

Commit

Permalink
Skip PackageReleaseComponents if Package was skipped
Browse files Browse the repository at this point in the history
fixes #8612
https://pulp.plan.io/issues/8612

(cherry picked from commit 1ad1be5)
  • Loading branch information
quba42 authored and goosemania committed May 4, 2021
1 parent ea0210e commit 1988dd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/8612.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a bug in the deb pipeline that was preventing successfull skipping of corrupted content for migrations with ``skip_corrupted=True``.
5 changes: 5 additions & 0 deletions pulp_2to3_migration/app/plugin/deb/pulp_2to3_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ def create_pulp3_content(self):
relative_path=self.package_relative_path,
sha256=self.package_sha256,
).first()
if not package:
# Perhaps the package was never created because the file was corrupt!
# We simply don't create the PackageReleaseComponent (just how the Package
# itself was not created) and hope for the best.
return (None, None)
pulp3_package_release_component = pulp3_models.PackageReleaseComponent(
release_component=release_component,
package=package,
Expand Down

0 comments on commit 1988dd6

Please sign in to comment.