Index: utils/pub/entrypoint.dart |
diff --git a/utils/pub/entrypoint.dart b/utils/pub/entrypoint.dart |
index d3af1fa53f92055e85d854aeed926ee7909ad1ed..b9585d5649867d7af94b71759d59fa1b039c85dc 100644 |
--- a/utils/pub/entrypoint.dart |
+++ b/utils/pub/entrypoint.dart |
@@ -6,6 +6,7 @@ library entrypoint; |
import 'io.dart'; |
import 'lock_file.dart'; |
+import 'log.dart' as log; |
import 'package.dart'; |
import 'root_source.dart'; |
import 'system_cache.dart'; |
@@ -87,6 +88,7 @@ class Entrypoint { |
if (!exists) return new Future.immediate(null); |
// TODO(nweiz): figure out when to actually delete the directory, and when |
// we can just re-use the existing symlink. |
+ log.fine("Deleting package directory for ${id.name} before install."); |
return deleteDir(packageDir); |
}).chain((_) { |
if (id.source.shouldCache) { |
@@ -167,6 +169,8 @@ class Entrypoint { |
Future<LockFile> _loadLockFile() { |
var completer = new Completer<LockFile>(); |
var lockFilePath = join(root.dir, 'pubspec.lock'); |
+ |
+ log.fine("Loading lockfile."); |
var future = readTextFile(lockFilePath); |
future.handleException((_) { |
@@ -174,8 +178,9 @@ class Entrypoint { |
// probably wrong and we should notify the user. |
fileExists(lockFilePath).transform((exists) { |
if (!exists) return; |
- printError("Error reading pubspec.lock: ${future.exception}"); |
+ log.error("Error reading pubspec.lock: ${future.exception}"); |
}).then((_) { |
+ log.fine("No lock file at $lockFilePath, creating empty one."); |
completer.complete(new LockFile.empty()); |
}); |
@@ -196,7 +201,9 @@ class Entrypoint { |
if (id.source is! RootSource) lockFile.packages[id.name] = id; |
} |
- return writeTextFile(join(root.dir, 'pubspec.lock'), lockFile.serialize()); |
+ var lockFilePath = join(root.dir, 'pubspec.lock'); |
+ log.fine("Saving lockfile."); |
+ return writeTextFile(lockFilePath, lockFile.serialize()); |
} |
/** |