Skip to content

Commit adcb288

Browse files
committed
fix(project): stop skipping source archives in copyProjects
shouldSkipFile dropped .tar.gz/.tar.xz/.tar.bz2/.zip when copying Home into StartDir, which broke PKGBUILDs whose source=() entries are local archives checked in next to the spec (e.g. *-dependencies.tar.gz). The files never landed in StartDir and validateSource then aborted with "Failed to open file for hash calculation". Restrict the skip list to built distro package outputs (.apk/.deb/.pkg.tar.zst/.rpm) so local source archives are copied through.
1 parent 496b591 commit adcb288

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

pkg/project/project_loader.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,13 @@ func shouldSkipFile(info os.FileInfo, src, dest string) (bool, error) {
256256
}
257257
}
258258

259-
// Define a slice of file extensions to skip
259+
// Define a slice of file extensions to skip.
260+
// Only built distro package outputs are skipped: generic source archives
261+
// (.tar.gz/.tar.xz/.tar.bz2/.zip) are legitimate PKGBUILD source=()
262+
// entries when checked in next to the PKGBUILD, and must be copied
263+
// into StartDir so validateSource() can hash them.
260264
skipExtensions := []string{
261265
".apk", ".deb", ".pkg.tar.zst", ".rpm",
262-
".tar.gz", ".tar.xz", ".tar.bz2", ".zip",
263266
}
264267
for _, ext := range skipExtensions {
265268
if strings.HasSuffix(src, ext) {

0 commit comments

Comments
 (0)