When loading package index for the mirror, ignore duplicate packages (and print about them). #183

This commit is contained in:
Andrey Smirnov committed 2015-01-31 21:27:26 +03:00
1 parent 0412646151
commit 403c7272cd
2 files changed
+11 -2

No files matched your search

+5 -1
View File
@@ -468,7 +468,11 @@ func (repo *RemoteRepo) DownloadPackageIndexes(progress aptly.Progress, d aptly.
}
err = repo.packageList.Add(p)
if err != nil {
return err
if _, ok := err.(*PackageConflictError); ok {
progress.ColoredPrintf("@y[!]@| @!skipping package %s: duplicate in packages index@|", p)
} else {
return err
}
}
err = collectionFactory.PackageCollection().Update(p)