mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-06 05:30:57 +00:00
Merge pull request #1404 from schoenherrg/fix/with-sources-ignored
Fix `-with-sources` not fetching differently named source packages
This commit is contained in:
+10
-4
@@ -266,8 +266,13 @@ func showPackages(c *gin.Context, reflist *deb.PackageRefList, collectionFactory
|
||||
|
||||
list.PrepareIndex()
|
||||
|
||||
list, err = list.Filter([]deb.PackageQuery{q}, withDeps,
|
||||
nil, context.DependencyOptions(), architecturesList)
|
||||
list, err = list.Filter(deb.FilterOptions{
|
||||
Queries: []deb.PackageQuery{q},
|
||||
WithDependencies: withDeps,
|
||||
Source: nil,
|
||||
DependencyOptions: context.DependencyOptions(),
|
||||
Architectures: architecturesList,
|
||||
})
|
||||
if err != nil {
|
||||
AbortWithJSONError(c, 500, fmt.Errorf("unable to search: %s", err))
|
||||
return
|
||||
@@ -283,8 +288,9 @@ func showPackages(c *gin.Context, reflist *deb.PackageRefList, collectionFactory
|
||||
fmt.Println("filter packages by version, query string parse err: ", err)
|
||||
c.AbortWithError(500, fmt.Errorf("unable to parse %s maximum version query string: %s", p.Name, err))
|
||||
} else {
|
||||
tmpList, err := list.Filter([]deb.PackageQuery{versionQ}, false,
|
||||
nil, 0, []string{})
|
||||
tmpList, err := list.Filter(deb.FilterOptions{
|
||||
Queries: []deb.PackageQuery{versionQ},
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
if tmpList.Len() > 0 {
|
||||
|
||||
Reference in New Issue
Block a user