mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
Make import skip file if Name/Version/Arch is empty. #193
This commit is contained in:
@@ -91,6 +91,24 @@ func ImportPackageFiles(list *PackageList, packageFiles []string, forceReplace b
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if p.Name == "" {
|
||||||
|
reporter.Warning("Empty package name on %s", file)
|
||||||
|
failedFiles = append(failedFiles, file)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if p.Version == "" {
|
||||||
|
reporter.Warning("Empty version on %s", file)
|
||||||
|
failedFiles = append(failedFiles, file)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if p.Architecture == "" {
|
||||||
|
reporter.Warning("Empty architecture on %s", file)
|
||||||
|
failedFiles = append(failedFiles, file)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
var checksums utils.ChecksumInfo
|
var checksums utils.ChecksumInfo
|
||||||
checksums, err = utils.ChecksumsForFile(file)
|
checksums, err = utils.ChecksumsForFile(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user