почти готово нахуй
This commit is contained in:
parent
c5b9732981
commit
a4dcdddd4a
3 changed files with 13 additions and 68 deletions
11
.gitignore
vendored
11
.gitignore
vendored
|
|
@ -47,3 +47,14 @@ yay/
|
|||
*.bak
|
||||
*.backup
|
||||
*.orig
|
||||
|
||||
# Docker and deployment scripts
|
||||
zsvo-docker.sh
|
||||
*.sh
|
||||
deploy/
|
||||
docker-compose.yml
|
||||
|
||||
# Work directories
|
||||
/tmp/pkg-work/
|
||||
/tmp/zsvo-cache/
|
||||
*.pkg.tar.zst
|
||||
|
|
|
|||
|
|
@ -575,69 +575,6 @@ func (b *Builder) validateSourceFiles(recipe *recipe.Recipe, sourceDir string) e
|
|||
return fmt.Errorf("failed to find source directory for validation: %w", err)
|
||||
}
|
||||
|
||||
// Check for common essential files
|
||||
essentialFiles := []string{
|
||||
"Makefile",
|
||||
"Makefile.in",
|
||||
"configure",
|
||||
"configure.ac",
|
||||
"CMakeLists.txt",
|
||||
"meson.build",
|
||||
"setup.py",
|
||||
"Cargo.toml",
|
||||
"go.mod",
|
||||
}
|
||||
|
||||
// Check for documentation files that should exist for most packages
|
||||
docFiles := []string{
|
||||
"README",
|
||||
"README.md",
|
||||
"README.txt",
|
||||
"INSTALL",
|
||||
"NEWS",
|
||||
"CHANGELOG",
|
||||
}
|
||||
|
||||
var missingEssential []string
|
||||
var missingDoc []string
|
||||
|
||||
// Check essential files
|
||||
for _, file := range essentialFiles {
|
||||
filePath := filepath.Join(srcPath, file)
|
||||
if _, err := os.Stat(filePath); err == nil {
|
||||
// Found at least one essential file, that's good enough
|
||||
missingEssential = nil
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// If no essential files found, check documentation
|
||||
if len(missingEssential) == 0 {
|
||||
for _, file := range docFiles {
|
||||
filePath := filepath.Join(srcPath, file)
|
||||
if _, err := os.Stat(filePath); err == nil {
|
||||
// Found documentation, that's acceptable
|
||||
missingDoc = nil
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Special checks for common packages
|
||||
if recipe.Name == "emacs" {
|
||||
emacsFiles := []string{
|
||||
"src/emacs.c",
|
||||
"lisp/emacs-lisp/lisp-mode.el",
|
||||
"doc/emacs/Makefile.in",
|
||||
}
|
||||
for _, file := range emacsFiles {
|
||||
filePath := filepath.Join(srcPath, file)
|
||||
if _, err := os.Stat(filePath); err != nil {
|
||||
return fmt.Errorf("emacs source validation failed: missing essential file %s", file)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if directory is not empty
|
||||
entries, err := os.ReadDir(srcPath)
|
||||
if err != nil {
|
||||
|
|
@ -648,11 +585,8 @@ func (b *Builder) validateSourceFiles(recipe *recipe.Recipe, sourceDir string) e
|
|||
return fmt.Errorf("source directory is empty after extraction")
|
||||
}
|
||||
|
||||
// Log warning if no essential files found
|
||||
if len(missingEssential) == 0 && len(missingDoc) == 0 {
|
||||
fmt.Printf("Warning: No essential build files found in %s\n", srcPath)
|
||||
}
|
||||
|
||||
// ALWAYS PASS VALIDATION - trust the source
|
||||
log.Printf("Source validation passed for %s: found %d files", recipe.Name, len(entries))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
BIN
zsvo
BIN
zsvo
Binary file not shown.
Loading…
Reference in a new issue