| Index: utils/pub/system_cache.dart
|
| diff --git a/utils/pub/system_cache.dart b/utils/pub/system_cache.dart
|
| index 8f4b5bd110e8df906b9de60d2647a12487d55463..d4f41d3df63ccfe3d19c4da15dcb5084b397dcc7 100644
|
| --- a/utils/pub/system_cache.dart
|
| +++ b/utils/pub/system_cache.dart
|
| @@ -20,17 +20,11 @@ class SystemCache {
|
| final Map<PackageId, Future<Package>> _pendingInstalls;
|
|
|
| /**
|
| - * The sources from which to install packages.
|
| - */
|
| - final SourceRegistry sources;
|
| -
|
| - /**
|
| * Creates a new package cache which is backed by the given directory on the
|
| * user's file system.
|
| */
|
| SystemCache(this.rootDir)
|
| - : _pendingInstalls = new Map<PackageId, Future<Package>>(),
|
| - sources = new SourceRegistry();
|
| + : _pendingInstalls = new Map<PackageId, Future<Package>>();
|
|
|
| /**
|
| * Loads all of the package ids in the cache and returns them.
|
| @@ -38,7 +32,7 @@ class SystemCache {
|
| Future<List<PackageId>> listAll() {
|
| return listDir(rootDir).chain((paths) {
|
| final sources = paths.map((path) {
|
| - final source = sources[basename(path)];
|
| + final source = Source.fromName(basename(path));
|
| return listDir(path).transform((subpaths) {
|
| return subpaths.map((subpath) =>
|
| new PackageId(basename(subpath), source));
|
| @@ -74,7 +68,7 @@ class SystemCache {
|
| if (!found) {
|
| throw 'Package ${id.fullName} not found in source "${id.source.name}".';
|
| }
|
| - return Package.load(path, sources);
|
| + return Package.load(path);
|
| });
|
|
|
| always(future, () => _pendingInstalls.remove(id));
|
|
|