Skip to content

Commit

Permalink
Test rpm metadata changes
Browse files Browse the repository at this point in the history
Signed-off-by: Divya Madala <[email protected]>
  • Loading branch information
Divyaasm committed Sep 9, 2024
1 parent bf59492 commit 0e316a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/validation_workflow/rpm/validation_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def cleanup(self) -> bool:

def validate_metadata(self, product_type: str) -> None:
(_, stdout, _) = execute(f'rpm -qip {os.path.join(self.tmp_dir.path, self.filename)}', ".")
logging.info("Meta data for the RPM distribution is: \n" + stdout)
ref_map = {}
ref_map['Name'] = product_type
ref_map['Version'] = self.args.version
Expand All @@ -93,7 +94,6 @@ def validate_metadata(self, product_type: str) -> None:
description_index = stdout.find(line)
meta_map[key] = stdout[description_index + len(line):].strip()
break
logging.info(meta_map)

for key, value in ref_map.items():
if key == "Architecture":
Expand All @@ -111,9 +111,9 @@ def validate_metadata(self, product_type: str) -> None:
def validate_signature(self) -> None:
(_, stdout, _) = execute(f'rpm -K -v {os.path.join(self.tmp_dir.path, self.filename)}', ".")
logging.info(stdout)
stdout.rstrip('\n')
print(type(stdout))
newline_count = stdout.count('\n')
stdout = stdout.rstrip('\n')
newline_count = text.count('\n')

print(newline_count)
key_list = ["Header V4 RSA/SHA512 Signature, key ID 9310d3fc", "Header SHA256 digest", "Header SHA1 digest", "Payload SHA256 digest", "V4 RSA/SHA512 Signature, key ID 9310d3fc", "MD5 digest"]
present_key = []
Expand Down

0 comments on commit 0e316a3

Please sign in to comment.