Skip to content

Commit

Permalink
Fetch capabilities from package not from the batch
Browse files Browse the repository at this point in the history
  • Loading branch information
meaksh committed Jul 22, 2024
1 parent 4b82a35 commit b4335f0
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions python/spacewalk/server/importlib/packageImport.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,15 @@ def _processPackage(self, package):
if nv not in self.capabilities:
self.capabilities[nv] = None

# Check whether package is a PTF or part of PTF
package["is_ptf"] = False
package["is_part_of_ptf"] = False
for cap in package["provides"]:
if cap["capability"][0] == "ptf()":
package["is_ptf"] = True
elif cap["capability"][0] == "ptf-package()":
package["is_part_of_ptf"] = True

# Process files too
fileList = package["files"]
for f in fileList:
Expand All @@ -339,16 +348,6 @@ def _processPackage(self, package):
if fchecksumTuple not in self.checksums:
self.checksums[fchecksumTuple] = None

# Check whether package is a PTF or part of PTF
# pylint: disable-next=consider-iterating-dictionary
package["is_ptf"] = False
package["is_part_of_ptf"] = False
for cap in self.capabilities.keys():
if cap[0] == "ptf()":
package["is_ptf"] = True
elif cap[0] == "ptf-package()":
package["is_part_of_ptf"] = True

# Uniquify changelog entries
unique_package_changelog_hash = set()
unique_package_changelog = []
Expand Down

0 comments on commit b4335f0

Please sign in to comment.