Skip to content

Commit

Permalink
Remove unused RPMReader method
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kelly <[email protected]>
  • Loading branch information
kellyma2 committed Nov 15, 2024
1 parent 7fd6f51 commit 01d6d3c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions pkg/rpm/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ func RPMToCPIO(rpmReader io.Reader) (*cpio.CpioStream, error) {
return cpio.NewCpioStream(payloadReader), nil
}

func RPMReader(rpmReader io.Reader, tarWriter *tar.Writer) error {
rpm, err := rpmutils.ReadRpm(rpmReader)
if err != nil {
return fmt.Errorf("failed to read rpm: %s", err)
}
payloadReader, err := rpm.RawUncompressedRPMPayloadReader()
if err != nil {
return fmt.Errorf("failed to open the payload reader: %s", err)
}
return cpio.Tar(payloadReader, tarWriter)
}

func PrefixFilter(prefix string, reader *tar.Reader, files []string) error {
prefix = strings.TrimPrefix(prefix, ".")

Expand Down

0 comments on commit 01d6d3c

Please sign in to comment.