mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-07 05:42:42 +00:00
fix lint complaints
This commit is contained in:
+1
-1
@@ -264,7 +264,7 @@ func (files *indexFiles) PackageIndex(component, arch string, udeb bool, install
|
||||
if udeb {
|
||||
relativePath = filepath.Join(component, "debian-installer", fmt.Sprintf("binary-%s", arch), "Packages")
|
||||
} else if installer {
|
||||
if distribution == "focal" {
|
||||
if distribution == aptly.DistributionFocal {
|
||||
relativePath = filepath.Join(component, fmt.Sprintf("installer-%s", arch), "current", "legacy-images", "SHA256SUMS")
|
||||
} else {
|
||||
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
|
||||
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")
|
||||
} else {
|
||||
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)
|
||||
} 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")
|
||||
} else {
|
||||
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
|
||||
// architecture
|
||||
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)
|
||||
} 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
|
||||
|
||||
Reference in New Issue
Block a user