Skip to content

Commit

Permalink
Ignore build-id directory in HasModifiedFiles
Browse files Browse the repository at this point in the history
The usr/lib/.build-id directory often has modifications. We don't
care about these getting modified. So, ignore in the initial scan.

Signed-off-by: Brad P. Crochet <brad@redhat.com>
  • Loading branch information
bcrochet authored and acornett21 committed May 23, 2023
1 parent 2ca0b0a commit 51af09a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/policy/container/has_modified_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,10 @@ func findRPMDB(ctx context.Context, layer v1.Layer) (found bool, pkglist []*rpmd
// directoryIsExcluded excludes a directory and any file contained in that directory.
func directoryIsExcluded(ctx context.Context, s string) bool {
excl := map[string]struct{}{
"etc": {},
"var": {},
"run": {},
"etc": {},
"var": {},
"run": {},
"usr/lib/.build-id": {},
}

for k := range excl {
Expand Down

0 comments on commit 51af09a

Please sign in to comment.