Misc style and simple mistakes fixes.

This commit is contained in:
Andrey Smirnov
2016-03-28 13:34:05 +03:00
parent 644d24d1cc
commit 587086beb4
6 changed files with 16 additions and 4 deletions
+6
View File
@@ -256,6 +256,12 @@ func CollectChangesFiles(locations []string, reporter aptly.ResultReporter) (cha
return nil
})
if err != nil {
reporter.Warning("Unable to process %s: %s", location, err2)
failedFiles = append(failedFiles, location)
continue
}
} else if strings.HasSuffix(info.Name(), ".changes") {
changesFiles = append(changesFiles, location)
}
+1 -1
View File
@@ -127,7 +127,7 @@ func GetContentsFromDeb(packageFile string) ([]string, error) {
case "data.tar.gz":
ungzip, err := gzip.NewReader(library)
if err != nil {
return nil, fmt.Errorf("unable to ungzip data.tar.gz from %s: %s", packageFile,err)
return nil, fmt.Errorf("unable to ungzip data.tar.gz from %s: %s", packageFile, err)
}
defer ungzip.Close()
tarInput = ungzip
+6
View File
@@ -34,6 +34,12 @@ func CollectPackageFiles(locations []string, reporter aptly.ResultReporter) (pac
return nil
})
if err2 != nil {
reporter.Warning("Unable to process %s: %s", location, err2)
failedFiles = append(failedFiles, location)
continue
}
} else {
if strings.HasSuffix(info.Name(), ".deb") || strings.HasSuffix(info.Name(), ".udeb") ||
strings.HasSuffix(info.Name(), ".dsc") || strings.HasSuffix(info.Name(), ".ddeb") {
+1 -1
View File
@@ -282,7 +282,7 @@ func depSliceDeduplicate(s []Dependency) []Dependency {
// VerifyDependencies looks for missing dependencies in package list.
//
// Analysis would be peformed for each architecture, in specified sources
// Analysis would be performed for each architecture, in specified sources
func (l *PackageList) VerifyDependencies(options int, architectures []string, sources *PackageList, progress aptly.Progress) ([]Dependency, error) {
l.PrepareIndex()
missing := make([]Dependency, 0, 128)
+1 -1
View File
@@ -294,7 +294,7 @@ func (p *PublishedRepo) MarshalJSON() ([]byte, error) {
})
}
// String returns human-readable represenation of PublishedRepo
// String returns human-readable representation of PublishedRepo
func (p *PublishedRepo) String() string {
var sources = []string{}
+1 -1
View File
@@ -146,7 +146,7 @@ func (repo *RemoteRepo) IsFlat() bool {
return repo.Distribution == "" || (strings.HasPrefix(repo.Distribution, ".") && strings.HasSuffix(repo.Distribution, "/"))
}
// NumPackages return number of packages retrived from remote repo
// NumPackages return number of packages retrieved from remote repo
func (repo *RemoteRepo) NumPackages() int {
if repo.packageRefs == nil {
return 0