Fix bugs with publishing w/o source or short names.

This commit is contained in:
Andrey Smirnov
2013-12-26 17:28:37 +04:00
parent 47ffd1977a
commit bc2eba459f
3 changed files with 16 additions and 2 deletions
+6 -1
View File
@@ -98,7 +98,12 @@ func (p *PublishedRepo) Publish(repo *Repository, packageCollection *PackageColl
err = list.ForEach(func(pkg *Package) error {
if pkg.Architecture == arch || pkg.Architecture == "all" {
path, err := repo.LinkFromPool(p.Prefix, p.Component, pkg.Filename, pkg.HashMD5, pkg.Source)
source := pkg.Source
if source == "" {
source = pkg.Name
}
path, err := repo.LinkFromPool(p.Prefix, p.Component, pkg.Filename, pkg.HashMD5, source)
if err != nil {
return err
}