mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-04 05:10:40 +00:00
Simplification: we are already able to search for all packages. #70
This commit is contained in:
@@ -107,13 +107,11 @@ func aptlySnapshotPull(cmd *commander.Command, args []string) error {
|
|||||||
if !noRemove {
|
if !noRemove {
|
||||||
// Remove all packages with the same name and architecture
|
// Remove all packages with the same name and architecture
|
||||||
for _, pkg := range searchResults {
|
for _, pkg := range searchResults {
|
||||||
for pS := packageList.Search(deb.Dependency{Architecture: pkg.Architecture, Pkg: pkg.Name}, allMatches); pS != nil; {
|
pS := packageList.Search(deb.Dependency{Architecture: pkg.Architecture, Pkg: pkg.Name}, true)
|
||||||
for _, p := range pS {
|
for _, p := range pS {
|
||||||
packageList.Remove(p)
|
packageList.Remove(p)
|
||||||
context.Progress().ColoredPrintf("@r[-]@| %s removed", p)
|
context.Progress().ColoredPrintf("@r[-]@| %s removed", p)
|
||||||
}
|
}
|
||||||
pS = packageList.Search(deb.Dependency{Architecture: pkg.Architecture, Pkg: pkg.Name}, allMatches)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,6 +195,5 @@ Example:
|
|||||||
cmd.Flag.Bool("no-remove", false, "don't remove other package versions when pulling package")
|
cmd.Flag.Bool("no-remove", false, "don't remove other package versions when pulling package")
|
||||||
cmd.Flag.Bool("all-matches", false, "pull all the packages that satisfy the dependency version requirements")
|
cmd.Flag.Bool("all-matches", false, "pull all the packages that satisfy the dependency version requirements")
|
||||||
|
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user