Skip to content

Commit

Permalink
store installed files in struct package
Browse files Browse the repository at this point in the history
Co-authored-by: Sylvain Baubeau <[email protected]>
  • Loading branch information
AliDatadog committed Oct 2, 2023
1 parent 3be5e6b commit 04ea18c
Show file tree
Hide file tree
Showing 6 changed files with 506 additions and 281 deletions.
4 changes: 3 additions & 1 deletion pkg/fanal/analyzer/pkg/apk/apk.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ func (a alpinePkgAnalyzer) parseApkInfo(scanner *bufio.Scanner) ([]types.Package
case "F:":
dir = line[2:]
case "R:":
installedFiles = append(installedFiles, path.Join(dir, line[2:]))
absPath := path.Join(dir, line[2:])
pkg.InstalledFiles = append(pkg.InstalledFiles, absPath)
installedFiles = append(installedFiles, absPath)
case "p:": // provides (corresponds to provides in PKGINFO, concatenated by spaces into a single line)
a.parseProvides(line, pkg.ID, provides)
case "D:": // dependencies (corresponds to depend in PKGINFO, concatenated by spaces into a single line)
Expand Down
Loading

0 comments on commit 04ea18c

Please sign in to comment.