private Package.ObjectMap[] GetObjectsToFetch(bool skipWhenFileMatches, IReadOnlyCollection<Package> packages,
List<Uri> allRemotes) {
var objects = new List<Package.ObjectMap>();
var j = 0;
foreach (var package in packages) {
var name = package.MetaData.GetFullName();
var remotes = FindRemotesWithPackage(name).ToArray();
Console.WriteLine(string.Empty);
if (!remotes.Any())
throw new NoSourceFoundException("No source found with " + name);
allRemotes.AddRange(remotes);
Repository.Log("Processing package: {0}", name);
objects.AddRange(package.GetNeededObjects(skipWhenFileMatches));
}
return objects.GroupBy(x => x.FO.Checksum).Select(x => x.First()).ToArray();
}