Skip to content

Commit

Permalink
[fix] annocheck: fix the debuginfo package lookup
Browse files Browse the repository at this point in the history
Fixes: #1369

Signed-off-by: Michal Srb <michal@redhat.com>
  • Loading branch information
msrb authored and dcantrell committed Apr 12, 2024
1 parent 0afd052 commit 8ea7f79
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/paths.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const char *get_debuginfo_path(struct rpminspect *ri, const rpmfile_entry_t *fil
rpmfile_entry_t *pfile = NULL;
unsigned int count = 0;
struct stat sb;
Header peer_rpm_header = NULL;

assert(ri != NULL);
assert(file != NULL);
Expand Down Expand Up @@ -90,14 +91,16 @@ const char *get_debuginfo_path(struct rpminspect *ri, const rpmfile_entry_t *fil

if (build == BEFORE_BUILD) {
name = headerGetString(peer->before_hdr, RPMTAG_NAME);
peer_rpm_header = peer->before_hdr;
} else {
name = headerGetString(peer->after_hdr, RPMTAG_NAME);
peer_rpm_header = peer->after_hdr;
}

assert(name != NULL);

/* found debuginfo package */
if (is_debuginfo_rpm(file->rpm_header)) {
if (is_debuginfo_rpm(peer_rpm_header)) {
count++;

/* used for older systems that generate single debuginfo packages */
Expand Down

0 comments on commit 8ea7f79

Please sign in to comment.