| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library('entrypoint'); | 5 library entrypoint; |
| 6 | 6 |
| 7 #import('io.dart'); | 7 import 'io.dart'; |
| 8 #import('lock_file.dart'); | 8 import 'lock_file.dart'; |
| 9 #import('package.dart'); | 9 import 'package.dart'; |
| 10 #import('root_source.dart'); | 10 import 'root_source.dart'; |
| 11 #import('system_cache.dart'); | 11 import 'system_cache.dart'; |
| 12 #import('version.dart'); | 12 import 'version.dart'; |
| 13 #import('version_solver.dart'); | 13 import 'version_solver.dart'; |
| 14 #import('utils.dart'); | 14 import 'utils.dart'; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Pub operates over a directed graph of dependencies that starts at a root | 17 * Pub operates over a directed graph of dependencies that starts at a root |
| 18 * "entrypoint" package. This is typically the package where the current | 18 * "entrypoint" package. This is typically the package where the current |
| 19 * working directory is located. An entrypoint knows the [root] package it is | 19 * working directory is located. An entrypoint knows the [root] package it is |
| 20 * associated with and is responsible for managing the "packages" directory | 20 * associated with and is responsible for managing the "packages" directory |
| 21 * for it. | 21 * for it. |
| 22 * | 22 * |
| 23 * That directory contains symlinks to all packages used by an app. These links | 23 * That directory contains symlinks to all packages used by an app. These links |
| 24 * point either to the [SystemCache] or to some other location on the local | 24 * point either to the [SystemCache] or to some other location on the local |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 * Creates a symlink to the `packages` directory in [dir] if none exists. | 271 * Creates a symlink to the `packages` directory in [dir] if none exists. |
| 272 */ | 272 */ |
| 273 Future _linkSecondaryPackageDir(String dir) { | 273 Future _linkSecondaryPackageDir(String dir) { |
| 274 var to = join(dir, 'packages'); | 274 var to = join(dir, 'packages'); |
| 275 return exists(to).chain((exists) { | 275 return exists(to).chain((exists) { |
| 276 if (exists) return new Future.immediate(null); | 276 if (exists) return new Future.immediate(null); |
| 277 return createSymlink(path, to); | 277 return createSymlink(path, to); |
| 278 }); | 278 }); |
| 279 } | 279 } |
| 280 } | 280 } |
| OLD | NEW |