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 e064763 commit 8d19542
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/validation_workflow/rpm/validation_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ 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 Down Expand Up @@ -112,11 +111,10 @@ 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)
print(type(stdout))
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 = []
x = 0
for line in stdout.split('\n'):
x=x+1
key = line.split(':')[0].strip()
if key != os.path.join(self.tmp_dir.path, self.filename):
if len(line.split(':', 1)) > 1 and "OK" == line.split(':')[1].strip():
Expand Down

0 comments on commit 8d19542

Please sign in to comment.