mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-02 04:50:49 +00:00
fix lint complaints
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
package aptly
|
||||||
|
|
||||||
|
var DistributionFocal = "focal"
|
||||||
+1
-1
@@ -264,7 +264,7 @@ func (files *indexFiles) PackageIndex(component, arch string, udeb bool, install
|
|||||||
if udeb {
|
if udeb {
|
||||||
relativePath = filepath.Join(component, "debian-installer", fmt.Sprintf("binary-%s", arch), "Packages")
|
relativePath = filepath.Join(component, "debian-installer", fmt.Sprintf("binary-%s", arch), "Packages")
|
||||||
} else if installer {
|
} else if installer {
|
||||||
if distribution == "focal" {
|
if distribution == aptly.DistributionFocal {
|
||||||
relativePath = filepath.Join(component, fmt.Sprintf("installer-%s", arch), "current", "legacy-images", "SHA256SUMS")
|
relativePath = filepath.Join(component, fmt.Sprintf("installer-%s", arch), "current", "legacy-images", "SHA256SUMS")
|
||||||
} else {
|
} else {
|
||||||
relativePath = filepath.Join(component, fmt.Sprintf("installer-%s", arch), "current", "images", "SHA256SUMS")
|
relativePath = filepath.Join(component, fmt.Sprintf("installer-%s", arch), "current", "images", "SHA256SUMS")
|
||||||
|
|||||||
+1
-1
@@ -190,7 +190,7 @@ func NewInstallerPackageFromControlFile(input Stanza, repo *RemoteRepo, componen
|
|||||||
}
|
}
|
||||||
|
|
||||||
var relPath string
|
var relPath string
|
||||||
if repo.Distribution == "focal" {
|
if repo.Distribution == aptly.DistributionFocal {
|
||||||
relPath = filepath.Join("dists", repo.Distribution, component, fmt.Sprintf("%s-%s", p.Name, architecture), "current", "legacy-images")
|
relPath = filepath.Join("dists", repo.Distribution, component, fmt.Sprintf("%s-%s", p.Name, architecture), "current", "legacy-images")
|
||||||
} else {
|
} else {
|
||||||
relPath = filepath.Join("dists", repo.Distribution, component, fmt.Sprintf("%s-%s", p.Name, architecture), "current", "images")
|
relPath = filepath.Join("dists", repo.Distribution, component, fmt.Sprintf("%s-%s", p.Name, architecture), "current", "images")
|
||||||
|
|||||||
+1
-1
@@ -665,7 +665,7 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
|
|||||||
}
|
}
|
||||||
relPath = filepath.Join("pool", component, poolDir)
|
relPath = filepath.Join("pool", component, poolDir)
|
||||||
} else {
|
} else {
|
||||||
if p.Distribution == "focal" {
|
if p.Distribution == aptly.DistributionFocal {
|
||||||
relPath = filepath.Join("dists", p.Distribution, component, fmt.Sprintf("%s-%s", pkg.Name, arch), "current", "legacy-images")
|
relPath = filepath.Join("dists", p.Distribution, component, fmt.Sprintf("%s-%s", pkg.Name, arch), "current", "legacy-images")
|
||||||
} else {
|
} else {
|
||||||
relPath = filepath.Join("dists", p.Distribution, component, fmt.Sprintf("%s-%s", pkg.Name, arch), "current", "images")
|
relPath = filepath.Join("dists", p.Distribution, component, fmt.Sprintf("%s-%s", pkg.Name, arch), "current", "images")
|
||||||
|
|||||||
+2
-3
@@ -259,11 +259,10 @@ func (repo *RemoteRepo) UdebPath(component string, architecture string) string {
|
|||||||
// InstallerPath returns path of Packages files for given component and
|
// InstallerPath returns path of Packages files for given component and
|
||||||
// architecture
|
// architecture
|
||||||
func (repo *RemoteRepo) InstallerPath(component string, architecture string) string {
|
func (repo *RemoteRepo) InstallerPath(component string, architecture string) string {
|
||||||
if repo.Distribution == "focal" {
|
if repo.Distribution == aptly.DistributionFocal {
|
||||||
return fmt.Sprintf("%s/installer-%s/current/legacy-images/SHA256SUMS", component, architecture)
|
return fmt.Sprintf("%s/installer-%s/current/legacy-images/SHA256SUMS", component, architecture)
|
||||||
} else {
|
|
||||||
return fmt.Sprintf("%s/installer-%s/current/images/SHA256SUMS", component, architecture)
|
|
||||||
}
|
}
|
||||||
|
return fmt.Sprintf("%s/installer-%s/current/images/SHA256SUMS", component, architecture)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackageURL returns URL of package file relative to repository root
|
// PackageURL returns URL of package file relative to repository root
|
||||||
|
|||||||
Reference in New Issue
Block a user