Skip to content

Commit

Permalink
Ignore ghost and artifact RPM files
Browse files Browse the repository at this point in the history
If a file is marked as a ghost or artifact, it should be ignored in
the context of HasModifiedFiles.

Signed-off-by: Brad P. Crochet <brad@redhat.com>
  • Loading branch information
bcrochet authored and acornett21 committed Jul 10, 2023
1 parent d03f7eb commit 7f7f771
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/policy/container/has_modified_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,9 @@ func installedFileMapWithExclusions(ctx context.Context, pkglist []*rpmdb.Packag
rpmdb.RPMFILE_DOC |
rpmdb.RPMFILE_LICENSE |
rpmdb.RPMFILE_MISSINGOK |
rpmdb.RPMFILE_README
rpmdb.RPMFILE_README |
rpmdb.RPMFILE_ARTIFACT |
rpmdb.RPMFILE_GHOST
m := map[string]string{}
for _, pkg := range pkglist {
files, err := pkg.InstalledFiles()
Expand Down

0 comments on commit 7f7f771

Please sign in to comment.