diff --git a/internal/helper/helper.go b/internal/helper/helper.go index b0bcf4dd..4397466c 100644 --- a/internal/helper/helper.go +++ b/internal/helper/helper.go @@ -382,7 +382,7 @@ func SafeQuantitySubtraction(orig, subtract quantity.Size) quantity.Size { // CreateTarArchive places all of the files from a source directory into a tar. // Currently supported are uncompressed tar archives and the following // compression types: gzip, xz bzip2, zstd -func CreateTarArchive(src, dest, compression string, verbose, debug bool) error { +func CreateTarArchive(src, dest, compression string, debug bool) error { tarCommand := exec.Command( "tar", "--directory", @@ -418,7 +418,7 @@ func CreateTarArchive(src, dest, compression string, verbose, debug bool) error // ExtractTarArchive extracts all the files from a tar. Currently supported are // uncompressed tar archives and the following compression types: zip, gzip, xz // bzip2, zstd -func ExtractTarArchive(src, dest string, verbose, debug bool) error { +func ExtractTarArchive(src, dest string, debug bool) error { tarCommand := exec.Command( "tar", "--xattrs", diff --git a/internal/helper/helper_test.go b/internal/helper/helper_test.go index e81d7d4a..70d49a24 100644 --- a/internal/helper/helper_test.go +++ b/internal/helper/helper_test.go @@ -542,10 +542,10 @@ func TestTarXattrs(t *testing.T) { // now run the helper tar creation and extraction functions tarPath := filepath.Join(testDir, "test-xattrs.tar") - err = CreateTarArchive(testDir, tarPath, "uncompressed", false, false) + err = CreateTarArchive(testDir, tarPath, "uncompressed", false) asserter.AssertErrNil(err, true) - err = ExtractTarArchive(tarPath, extractDir, false, false) + err = ExtractTarArchive(tarPath, extractDir, false) asserter.AssertErrNil(err, true) // now read the extracted file's extended attributes @@ -569,7 +569,7 @@ func TestPingXattrs(t *testing.T) { t.Cleanup(func() { os.RemoveAll(testDir) }) testFile := filepath.Join("testdata", "rootfs_tarballs", "ping.tar") - err = ExtractTarArchive(testFile, testDir, true, true) + err = ExtractTarArchive(testFile, testDir, true) asserter.AssertErrNil(err, true) binPing := filepath.Join(testDir, "bin", "ping") diff --git a/internal/statemachine/classic_states.go b/internal/statemachine/classic_states.go index 04a86fc9..699672fe 100644 --- a/internal/statemachine/classic_states.go +++ b/internal/statemachine/classic_states.go @@ -572,8 +572,7 @@ func (stateMachine *StateMachine) extractRootfsTar() error { } // now extract the archive - return helper.ExtractTarArchive(tarPath, stateMachine.tempDirs.chroot, - stateMachine.commonFlags.Verbose, stateMachine.commonFlags.Debug) + return helper.ExtractTarArchive(tarPath, stateMachine.tempDirs.chroot, stateMachine.commonFlags.Debug) } var germinateState = stateFunc{"germinate", (*StateMachine).germinate}