about summary refs log tree commit diff
path: root/src/librustpkg
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-10-22 09:24:48 -0700
committerbors <bors@rust-lang.org>2013-10-22 09:24:48 -0700
commitfd2c0128a7dd3cb19eda253acd01cd7905d1c7dc (patch)
tree5e61220d514b0e59df849455008695490b2e4f42 /src/librustpkg
parentcd8c7cf61239d4f23868b8765207026f602a79db (diff)
parent3ed18bdd42e10f57890befe015f6861d52429e12 (diff)
downloadrust-fd2c0128a7dd3cb19eda253acd01cd7905d1c7dc.tar.gz
rust-fd2c0128a7dd3cb19eda253acd01cd7905d1c7dc.zip
auto merge of #10006 : alexcrichton/rust/another-massive-rename, r=brson
Drop the `2` suffix on all of them, updating all code in the process of doing so. This is a completely automated change, and it's dependent on the snapshots going through.
Diffstat (limited to 'src/librustpkg')
-rw-r--r--src/librustpkg/api.rs2
-rw-r--r--src/librustpkg/context.rs2
-rw-r--r--src/librustpkg/installed_packages.rs8
-rw-r--r--src/librustpkg/package_source.rs52
-rw-r--r--src/librustpkg/path_util.rs46
-rw-r--r--src/librustpkg/rustpkg.rs66
-rw-r--r--src/librustpkg/search.rs2
-rw-r--r--src/librustpkg/source_control.rs16
-rw-r--r--src/librustpkg/tests.rs192
-rw-r--r--src/librustpkg/util.rs70
-rw-r--r--src/librustpkg/version.rs16
-rw-r--r--src/librustpkg/workcache_support.rs4
-rw-r--r--src/librustpkg/workspace.rs2
13 files changed, 239 insertions, 239 deletions
diff --git a/src/librustpkg/api.rs b/src/librustpkg/api.rs
index 02a96402229..1f5802927a6 100644
--- a/src/librustpkg/api.rs
+++ b/src/librustpkg/api.rs
@@ -54,7 +54,7 @@ fn binary_is_fresh(path: &str, in_hash: &str) -> bool {
 
 pub fn new_workcache_context(p: &Path) -> workcache::Context {
     let db_file = p.join("rustpkg_db.json"); // ??? probably wrong
-    debug2!("Workcache database file: {}", db_file.display());
+    debug!("Workcache database file: {}", db_file.display());
     let db = RWArc::new(Database::new(db_file));
     let lg = RWArc::new(Logger::new());
     let cfg = Arc::new(TreeMap::new());
diff --git a/src/librustpkg/context.rs b/src/librustpkg/context.rs
index 554019133b2..3f1f2a1f59d 100644
--- a/src/librustpkg/context.rs
+++ b/src/librustpkg/context.rs
@@ -154,7 +154,7 @@ impl Context {
 /// rustpkg from a Rust target directory. This is part of a
 /// kludgy hack used to adjust the sysroot.
 pub fn in_target(sysroot: &Path) -> bool {
-    debug2!("Checking whether {} is in target", sysroot.display());
+    debug!("Checking whether {} is in target", sysroot.display());
     let mut p = sysroot.dir_path();
     p.set_filename("rustc");
     os::path_is_dir(&p)
diff --git a/src/librustpkg/installed_packages.rs b/src/librustpkg/installed_packages.rs
index ecc0b7f07e2..767a31ed785 100644
--- a/src/librustpkg/installed_packages.rs
+++ b/src/librustpkg/installed_packages.rs
@@ -31,17 +31,17 @@ pub fn list_installed_packages(f: &fn(&PkgId) -> bool) -> bool  {
         }
         let libfiles = os::list_dir(&p.join("lib"));
         for lib in libfiles.iter() {
-            debug2!("Full name: {}", lib.display());
+            debug!("Full name: {}", lib.display());
             match has_library(lib) {
                 Some(basename) => {
                     let parent = p.join("lib");
-                    debug2!("parent = {}, child = {}",
+                    debug!("parent = {}, child = {}",
                             parent.display(), lib.display());
                     let rel_p = lib.path_relative_from(&parent).unwrap();
-                    debug2!("Rel: {}", rel_p.display());
+                    debug!("Rel: {}", rel_p.display());
                     let rel_path = rel_p.join(basename);
                     do rel_path.display().with_str |s| {
-                        debug2!("Rel name: {}", s);
+                        debug!("Rel name: {}", s);
                         f(&PkgId::new(s));
                     }
                 }
diff --git a/src/librustpkg/package_source.rs b/src/librustpkg/package_source.rs
index c1e5dbf5ee5..68d2d9662e3 100644
--- a/src/librustpkg/package_source.rs
+++ b/src/librustpkg/package_source.rs
@@ -77,7 +77,7 @@ impl PkgSrc {
                id: PkgId) -> PkgSrc {
         use conditions::nonexistent_package::cond;
 
-        debug2!("Checking package source for package ID {}, \
+        debug!("Checking package source for package ID {}, \
                 workspace = {} -> {}, use_rust_path_hack = {:?}",
                 id.to_str(),
                 source_workspace.display(),
@@ -115,13 +115,13 @@ impl PkgSrc {
 
         }
 
-        debug2!("Checking dirs: {:?}", to_try.map(|p| p.display().to_str()).connect(":"));
+        debug!("Checking dirs: {:?}", to_try.map(|p| p.display().to_str()).connect(":"));
 
         let path = to_try.iter().find(|&d| os::path_exists(d));
 
         // See the comments on the definition of PkgSrc
         let mut build_in_destination = use_rust_path_hack;
-        debug2!("1. build_in_destination = {:?}", build_in_destination);
+        debug!("1. build_in_destination = {:?}", build_in_destination);
 
         let dir: Path = match path {
             Some(d) => (*d).clone(),
@@ -131,7 +131,7 @@ impl PkgSrc {
                 for (prefix, suffix) in id.prefixes_iter() {
                     let package_id = PkgId::new(prefix.as_str().unwrap());
                     let path = build_dir.join(&package_id.path);
-                    debug2!("in loop: checking if {} is a directory", path.display());
+                    debug!("in loop: checking if {} is a directory", path.display());
                     if os::path_is_dir(&path) {
                         let ps = PkgSrc::new(source_workspace,
                                              destination_workspace,
@@ -154,7 +154,7 @@ impl PkgSrc {
                                     tests: ~[],
                                     benchs: ~[]
                                 };
-                                debug2!("pkgsrc: Returning {}", result.to_str());
+                                debug!("pkgsrc: Returning {}", result.to_str());
                                 return result;
                             }
                         }
@@ -165,12 +165,12 @@ impl PkgSrc {
                 // Ok, no prefixes work, so try fetching from git
                 let mut ok_d = None;
                 for w in output_names.iter() {
-                    debug2!("Calling fetch_git on {}", w.display());
+                    debug!("Calling fetch_git on {}", w.display());
                     let target_dir_opt = PkgSrc::fetch_git(w, &id);
                     for p in target_dir_opt.iter() {
                         ok_d = Some(p.clone());
                         build_in_destination = true;
-                        debug2!("2. build_in_destination = {:?}", build_in_destination);
+                        debug!("2. build_in_destination = {:?}", build_in_destination);
                         break;
                     }
                     match ok_d {
@@ -232,10 +232,10 @@ impl PkgSrc {
                 }
             }
         };
-        debug2!("3. build_in_destination = {:?}", build_in_destination);
-        debug2!("source: {} dest: {}", source_workspace.display(), destination_workspace.display());
+        debug!("3. build_in_destination = {:?}", build_in_destination);
+        debug!("source: {} dest: {}", source_workspace.display(), destination_workspace.display());
 
-        debug2!("For package id {}, returning {}", id.to_str(), dir.display());
+        debug!("For package id {}, returning {}", id.to_str(), dir.display());
 
         if !os::path_is_dir(&dir) {
             cond.raise((id.clone(), ~"supplied path for package dir is a \
@@ -264,7 +264,7 @@ impl PkgSrc {
         use conditions::git_checkout_failed::cond;
 
         let cwd = os::getcwd();
-        debug2!("Checking whether {} (path = {}) exists locally. Cwd = {}, does it? {:?}",
+        debug!("Checking whether {} (path = {}) exists locally. Cwd = {}, does it? {:?}",
                 pkgid.to_str(), pkgid.path.display(),
                 cwd.display(),
                 os::path_exists(&pkgid.path));
@@ -282,7 +282,7 @@ impl PkgSrc {
 
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 let url = format!("https://{}", pkgid.path.as_str().unwrap());
-                debug2!("Fetching package: git clone {} {} [version={}]",
+                debug!("Fetching package: git clone {} {} [version={}]",
                         url, clone_target.display(), pkgid.version.to_str());
 
                 let mut failed = false;
@@ -311,7 +311,7 @@ impl PkgSrc {
     // return the path for it. Otherwise, None
     pub fn package_script_option(&self) -> Option<Path> {
         let maybe_path = self.start_dir.join("pkg.rs");
-        debug2!("package_script_option: checking whether {} exists", maybe_path.display());
+        debug!("package_script_option: checking whether {} exists", maybe_path.display());
         if os::path_exists(&maybe_path) {
             Some(maybe_path)
         } else {
@@ -334,7 +334,7 @@ impl PkgSrc {
         for c in it {
             sub.push(c);
         }
-        debug2!("Will compile crate {}", sub.display());
+        debug!("Will compile crate {}", sub.display());
         cs.push(Crate::new(&sub));
     }
 
@@ -348,7 +348,7 @@ impl PkgSrc {
         use conditions::missing_pkg_files::cond;
 
         let prefix = self.start_dir.component_iter().len();
-        debug2!("Matching against {}", self.id.short_name);
+        debug!("Matching against {}", self.id.short_name);
         do os::walk_dir(&self.start_dir) |pth| {
             let maybe_known_crate_set = match pth.filename_str() {
                 Some(filename) if filter(filename) => match filename {
@@ -377,7 +377,7 @@ impl PkgSrc {
             cond.raise(self.id.clone());
         }
 
-        debug2!("In {}, found {} libs, {} mains, {} tests, {} benchs",
+        debug!("In {}, found {} libs, {} mains, {} tests, {} benchs",
                self.start_dir.display(),
                self.libs.len(),
                self.mains.len(),
@@ -393,11 +393,11 @@ impl PkgSrc {
                     what: OutputType) {
         for crate in crates.iter() {
             let path = self.start_dir.join(&crate.file);
-            debug2!("build_crates: compiling {}", path.display());
+            debug!("build_crates: compiling {}", path.display());
             let cfgs = crate.cfgs + cfgs;
 
             do ctx.workcache_context.with_prep(crate_tag(&path)) |prep| {
-                debug2!("Building crate {}, declaring it as an input", path.display());
+                debug!("Building crate {}, declaring it as an input", path.display());
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 prep.declare_input("file", path.as_str().unwrap(),
                                    workcache_support::digest_file_with_date(&path));
@@ -424,7 +424,7 @@ impl PkgSrc {
                     // output as "Some(\"path\")". But I don't know what to do about it.
                     // FIXME (#9639): This needs to handle non-utf8 paths
                     let result = result.as_ref().map(|p|p.as_str().unwrap());
-                    debug2!("Result of compiling {} was {}", subpath.display(), result.to_str());
+                    debug!("Result of compiling {} was {}", subpath.display(), result.to_str());
                     result.to_str()
                 }
             };
@@ -436,11 +436,11 @@ impl PkgSrc {
     pub fn declare_inputs(&self, prep: &mut workcache::Prep) {
         let to_do = ~[self.libs.clone(), self.mains.clone(),
                       self.tests.clone(), self.benchs.clone()];
-        debug2!("In declare inputs, self = {}", self.to_str());
+        debug!("In declare inputs, self = {}", self.to_str());
         for cs in to_do.iter() {
             for c in cs.iter() {
                 let path = self.start_dir.join(&c.file);
-                debug2!("Declaring input: {}", path.display());
+                debug!("Declaring input: {}", path.display());
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 prep.declare_input("file", path.as_str().unwrap(),
                                    workcache_support::digest_file_with_date(&path.clone()));
@@ -459,14 +459,14 @@ impl PkgSrc {
         let mains = self.mains.clone();
         let tests = self.tests.clone();
         let benchs = self.benchs.clone();
-        debug2!("Building libs in {}, destination = {}",
+        debug!("Building libs in {}, destination = {}",
                self.source_workspace.display(), self.build_workspace().display());
         self.build_crates(build_context, &mut deps, libs, cfgs, Lib);
-        debug2!("Building mains");
+        debug!("Building mains");
         self.build_crates(build_context, &mut deps, mains, cfgs, Main);
-        debug2!("Building tests");
+        debug!("Building tests");
         self.build_crates(build_context, &mut deps, tests, cfgs, Test);
-        debug2!("Building benches");
+        debug!("Building benches");
         self.build_crates(build_context, &mut deps, benchs, cfgs, Bench);
         deps
     }
@@ -486,7 +486,7 @@ impl PkgSrc {
         let crate_sets = [&self.libs, &self.mains, &self.tests, &self.benchs];
         for crate_set in crate_sets.iter() {
             for c in crate_set.iter() {
-                debug2!("Built crate: {}", c.file.display())
+                debug!("Built crate: {}", c.file.display())
             }
         }
     }
diff --git a/src/librustpkg/path_util.rs b/src/librustpkg/path_util.rs
index 911cfde7164..c47c89d777b 100644
--- a/src/librustpkg/path_util.rs
+++ b/src/librustpkg/path_util.rs
@@ -25,7 +25,7 @@ use messages::*;
 pub fn default_workspace() -> Path {
     let p = rust_path();
     if p.is_empty() {
-        fail2!("Empty RUST_PATH");
+        fail!("Empty RUST_PATH");
     }
     let result = p[0];
     if !os::path_is_dir(&result) {
@@ -88,9 +88,9 @@ pub fn workspace_contains_package_id_(pkgid: &PkgId, workspace: &Path,
     };
 
     if found.is_some() {
-        debug2!("Found {} in {}", pkgid.to_str(), workspace.display());
+        debug!("Found {} in {}", pkgid.to_str(), workspace.display());
     } else {
-        debug2!("Didn't find {} in {}", pkgid.to_str(), workspace.display());
+        debug!("Didn't find {} in {}", pkgid.to_str(), workspace.display());
     }
     found
 }
@@ -123,13 +123,13 @@ fn target_bin_dir(workspace: &Path) -> Path {
 pub fn built_executable_in_workspace(pkgid: &PkgId, workspace: &Path) -> Option<Path> {
     let mut result = target_build_dir(workspace);
     result = mk_output_path(Main, Build, pkgid, result);
-    debug2!("built_executable_in_workspace: checking whether {} exists",
+    debug!("built_executable_in_workspace: checking whether {} exists",
            result.display());
     if os::path_exists(&result) {
         Some(result)
     }
     else {
-        debug2!("built_executable_in_workspace: {} does not exist", result.display());
+        debug!("built_executable_in_workspace: {} does not exist", result.display());
         None
     }
 }
@@ -150,13 +150,13 @@ fn output_in_workspace(pkgid: &PkgId, workspace: &Path, what: OutputType) -> Opt
     let mut result = target_build_dir(workspace);
     // should use a target-specific subdirectory
     result = mk_output_path(what, Build, pkgid, result);
-    debug2!("output_in_workspace: checking whether {} exists",
+    debug!("output_in_workspace: checking whether {} exists",
            result.display());
     if os::path_exists(&result) {
         Some(result)
     }
     else {
-        error2!("output_in_workspace: {} does not exist", result.display());
+        error!("output_in_workspace: {} does not exist", result.display());
         None
     }
 }
@@ -186,13 +186,13 @@ pub fn installed_library_in_workspace(pkg_path: &Path, workspace: &Path) -> Opti
 /// `short_name` is taken as the link name of the library.
 pub fn library_in_workspace(path: &Path, short_name: &str, where: Target,
                         workspace: &Path, prefix: &str, version: &Version) -> Option<Path> {
-    debug2!("library_in_workspace: checking whether a library named {} exists",
+    debug!("library_in_workspace: checking whether a library named {} exists",
            short_name);
 
     // We don't know what the hash is, so we have to search through the directory
     // contents
 
-    debug2!("short_name = {} where = {:?} workspace = {} \
+    debug!("short_name = {} where = {:?} workspace = {} \
             prefix = {}", short_name, where, workspace.display(), prefix);
 
     let dir_to_search = match where {
@@ -209,20 +209,20 @@ pub fn system_library(sysroot: &Path, lib_name: &str) -> Option<Path> {
 }
 
 fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Option<Path> {
-    debug2!("Listing directory {}", dir_to_search.display());
+    debug!("Listing directory {}", dir_to_search.display());
     let dir_contents = os::list_dir(dir_to_search);
-    debug2!("dir has {:?} entries", dir_contents.len());
+    debug!("dir has {:?} entries", dir_contents.len());
 
     let lib_prefix = format!("{}{}", os::consts::DLL_PREFIX, short_name);
     let lib_filetype = os::consts::DLL_EXTENSION;
 
-    debug2!("lib_prefix = {} and lib_filetype = {}", lib_prefix, lib_filetype);
+    debug!("lib_prefix = {} and lib_filetype = {}", lib_prefix, lib_filetype);
 
     // Find a filename that matches the pattern:
     // (lib_prefix)-hash-(version)(lib_suffix)
     let mut libraries = do dir_contents.iter().filter |p| {
         let extension = p.extension_str();
-        debug2!("p = {}, p's extension is {:?}", p.display(), extension);
+        debug!("p = {}, p's extension is {:?}", p.display(), extension);
         match extension {
             None => false,
             Some(ref s) => lib_filetype == *s
@@ -243,12 +243,12 @@ fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Opti
             if f_name.is_empty() { break; }
             match f_name.rfind('-') {
                 Some(i) => {
-                    debug2!("Maybe {} is a version", f_name.slice(i + 1, f_name.len()));
+                    debug!("Maybe {} is a version", f_name.slice(i + 1, f_name.len()));
                     match try_parsing_version(f_name.slice(i + 1, f_name.len())) {
                        Some(ref found_vers) if version == found_vers => {
                            match f_name.slice(0, i).rfind('-') {
                                Some(j) => {
-                                   debug2!("Maybe {} equals {}", f_name.slice(0, j), lib_prefix);
+                                   debug!("Maybe {} equals {}", f_name.slice(0, j), lib_prefix);
                                    if f_name.slice(0, j) == lib_prefix {
                                        result_filename = Some(p_path.clone());
                                    }
@@ -266,7 +266,7 @@ fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Opti
     } // for
 
     if result_filename.is_none() {
-        debug2!("warning: library_in_workspace didn't find a library in {} for {}",
+        debug!("warning: library_in_workspace didn't find a library in {} for {}",
                   dir_to_search.display(), short_name);
     }
 
@@ -274,7 +274,7 @@ fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Opti
     // (if result_filename != None)
     let abs_path = do result_filename.map |result_filename| {
         let absolute_path = dir_to_search.join(&result_filename);
-        debug2!("result_filename = {}", absolute_path.display());
+        debug!("result_filename = {}", absolute_path.display());
         absolute_path
     };
 
@@ -348,7 +348,7 @@ pub fn build_pkg_id_in_workspace(pkgid: &PkgId, workspace: &Path) -> Path {
 
     let mut result = target_build_dir(workspace);
     result.push(&pkgid.path);
-    debug2!("Creating build dir {} for package id {}", result.display(),
+    debug!("Creating build dir {} for package id {}", result.display(),
            pkgid.to_str());
     if os::path_exists(&result) || os::mkdir_recursive(&result, U_RWX) {
         result
@@ -372,7 +372,7 @@ pub fn mk_output_path(what: OutputType, where: Target,
         // and if we're just building, it goes in a package-specific subdir
         Build => workspace.join(&pkg_id.path)
     };
-    debug2!("[{:?}:{:?}] mk_output_path: short_name = {}, path = {}", what, where,
+    debug!("[{:?}:{:?}] mk_output_path: short_name = {}, path = {}", what, where,
            if what == Lib { short_name_with_version.clone() } else { pkg_id.short_name.clone() },
            dir.display());
     let mut output_path = match what {
@@ -390,7 +390,7 @@ pub fn mk_output_path(what: OutputType, where: Target,
     if !output_path.is_absolute() {
         output_path = os::getcwd().join(&output_path);
     }
-    debug2!("mk_output_path: returning {}", output_path.display());
+    debug!("mk_output_path: returning {}", output_path.display());
     output_path
 }
 
@@ -431,13 +431,13 @@ pub fn find_dir_using_rust_path_hack(p: &PkgId) -> Option<Path> {
         // Note that this only matches if the package ID being searched for
         // has a name that's a single component
         if dir.ends_with_path(&p.path) || dir.ends_with_path(&versionize(&p.path, &p.version)) {
-            debug2!("In find_dir_using_rust_path_hack: checking dir {}", dir.display());
+            debug!("In find_dir_using_rust_path_hack: checking dir {}", dir.display());
             if dir_has_crate_file(dir) {
-                debug2!("Did find id {} in dir {}", p.to_str(), dir.display());
+                debug!("Did find id {} in dir {}", p.to_str(), dir.display());
                 return Some(dir.clone());
             }
         }
-        debug2!("Didn't find id {} in dir {}", p.to_str(), dir.display())
+        debug!("Didn't find id {} in dir {}", p.to_str(), dir.display())
     }
     None
 }
diff --git a/src/librustpkg/rustpkg.rs b/src/librustpkg/rustpkg.rs
index 4d7983d9ff1..6c55f7af0c0 100644
--- a/src/librustpkg/rustpkg.rs
+++ b/src/librustpkg/rustpkg.rs
@@ -104,7 +104,7 @@ impl<'self> PkgScript<'self> {
         let binary = os::args()[0].to_managed();
         // Build the rustc session data structures to pass
         // to the compiler
-        debug2!("pkgscript parse: {}", sysroot.display());
+        debug!("pkgscript parse: {}", sysroot.display());
         let options = @session::options {
             binary: binary,
             maybe_sysroot: Some(sysroot),
@@ -120,7 +120,7 @@ impl<'self> PkgScript<'self> {
         let crate = driver::phase_2_configure_and_expand(sess, cfg.clone(), crate);
         let work_dir = build_pkg_id_in_workspace(id, workspace);
 
-        debug2!("Returning package script with id {}", id.to_str());
+        debug!("Returning package script with id {}", id.to_str());
 
         PkgScript {
             id: id,
@@ -140,10 +140,10 @@ impl<'self> PkgScript<'self> {
                   sysroot: &Path) -> (~[~str], ExitCode) {
         let sess = self.sess;
 
-        debug2!("Working directory = {}", self.build_dir.display());
+        debug!("Working directory = {}", self.build_dir.display());
         // Collect together any user-defined commands in the package script
         let crate = util::ready_crate(sess, self.crate.take_unwrap());
-        debug2!("Building output filenames with script name {}",
+        debug!("Building output filenames with script name {}",
                driver::source_name(&driver::file_input(self.input.clone())));
         let exe = self.build_dir.join("pkg" + util::exe_suffix());
         util::compile_crate_from_input(&self.input,
@@ -152,7 +152,7 @@ impl<'self> PkgScript<'self> {
                                        &self.build_dir,
                                        sess,
                                        crate);
-        debug2!("Running program: {} {} {}", exe.display(),
+        debug!("Running program: {} {} {}", exe.display(),
                sysroot.display(), "install");
         // Discover the output
         // FIXME (#9639): This needs to handle non-utf8 paths
@@ -165,7 +165,7 @@ impl<'self> PkgScript<'self> {
             return (~[], status);
         }
         else {
-            debug2!("Running program (configs): {} {} {}",
+            debug!("Running program (configs): {} {} {}",
                    exe.display(), sysroot.display(), "configs");
             // FIXME (#9639): This needs to handle non-utf8 paths
             let output = run::process_output(exe.as_str().unwrap(),
@@ -243,7 +243,7 @@ impl CtxMethods for BuildContext {
             let pkgid = PkgId::new(args[0].clone());
             let mut dest_ws = default_workspace();
             do each_pkg_parent_workspace(&self.context, &pkgid) |workspace| {
-                debug2!("found pkg {} in workspace {}, trying to build",
+                debug!("found pkg {} in workspace {}, trying to build",
                        pkgid.to_str(), workspace.display());
                 dest_ws = determine_destination(os::getcwd(),
                                                 self.context.use_rust_path_hack,
@@ -315,7 +315,7 @@ impl CtxMethods for BuildContext {
                     // argument
                     let pkgid = PkgId::new(args[0]);
                     let workspaces = pkg_parent_workspaces(&self.context, &pkgid);
-                    debug2!("package ID = {}, found it in {:?} workspaces",
+                    debug!("package ID = {}, found it in {:?} workspaces",
                            pkgid.to_str(), workspaces.len());
                     if workspaces.is_empty() {
                         let d = default_workspace();
@@ -401,13 +401,13 @@ impl CtxMethods for BuildContext {
 
                 self.unprefer(args[0], None);
             }
-            _ => fail2!("I don't know the command `{}`", cmd)
+            _ => fail!("I don't know the command `{}`", cmd)
         }
     }
 
     fn do_cmd(&self, _cmd: &str, _pkgname: &str)  {
         // stub
-        fail2!("`do` not yet implemented");
+        fail!("`do` not yet implemented");
     }
 
     fn build(&self, pkg_src: &mut PkgSrc, what_to_build: &WhatToBuild) {
@@ -416,7 +416,7 @@ impl CtxMethods for BuildContext {
         let workspace = pkg_src.source_workspace.clone();
         let pkgid = pkg_src.id.clone();
 
-        debug2!("build: workspace = {} (in Rust path? {:?} is git dir? {:?} \
+        debug!("build: workspace = {} (in Rust path? {:?} is git dir? {:?} \
                 pkgid = {} pkgsrc start_dir = {}", workspace.display(),
                in_rust_path(&workspace), is_git_dir(&workspace.join(&pkgid.path)),
                pkgid.to_str(), pkg_src.start_dir.display());
@@ -435,7 +435,7 @@ impl CtxMethods for BuildContext {
                 _ => cond.raise((pkgid.path.as_str().unwrap().to_owned(), out_dir.clone()))
             };
             let default_ws = default_workspace();
-            debug2!("Calling build recursively with {:?} and {:?}", default_ws.display(),
+            debug!("Calling build recursively with {:?} and {:?}", default_ws.display(),
                    pkgid.to_str());
             return self.build(&mut PkgSrc::new(default_ws.clone(),
                                                default_ws,
@@ -445,9 +445,9 @@ impl CtxMethods for BuildContext {
 
         // Is there custom build logic? If so, use it
         let mut custom = false;
-        debug2!("Package source directory = {}", pkg_src.to_str());
+        debug!("Package source directory = {}", pkg_src.to_str());
         let opt = pkg_src.package_script_option();
-        debug2!("Calling pkg_script_option on {:?}", opt);
+        debug!("Calling pkg_script_option on {:?}", opt);
         let cfgs = match pkg_src.package_script_option() {
             Some(package_script_path) => {
                 let sysroot = self.sysroot_to_use();
@@ -469,16 +469,16 @@ impl CtxMethods for BuildContext {
                         pscript.run_custom(exec, &sub_sysroot)
                     }
                 };
-                debug2!("Command return code = {:?}", hook_result);
+                debug!("Command return code = {:?}", hook_result);
                 if hook_result != 0 {
-                    fail2!("Error running custom build command")
+                    fail!("Error running custom build command")
                 }
                 custom = true;
                 // otherwise, the package script succeeded
                 cfgs
             }
             None => {
-                debug2!("No package script, continuing");
+                debug!("No package script, continuing");
                 ~[]
             }
         } + self.context.cfgs;
@@ -495,7 +495,7 @@ impl CtxMethods for BuildContext {
                 &JustOne(ref p) => {
                     // We expect that p is relative to the package source's start directory,
                     // so check that assumption
-                    debug2!("JustOne: p = {}", p.display());
+                    debug!("JustOne: p = {}", p.display());
                     assert!(os::path_exists(&pkg_src.start_dir.join(p)));
                     if is_lib(p) {
                         PkgSrc::push_crate(&mut pkg_src.libs, 0, p);
@@ -534,7 +534,7 @@ impl CtxMethods for BuildContext {
 
     fn info(&self) {
         // stub
-        fail2!("info not yet implemented");
+        fail!("info not yet implemented");
     }
 
     fn install(&self, mut pkg_src: PkgSrc, what: &WhatToBuild) -> (~[Path], ~[(~str, ~str)]) {
@@ -545,7 +545,7 @@ impl CtxMethods for BuildContext {
         let mut inputs = ~[];
         let mut build_inputs = ~[];
 
-        debug2!("Installing package source: {}", pkg_src.to_str());
+        debug!("Installing package source: {}", pkg_src.to_str());
 
         // workcache only knows about *crates*. Building a package
         // just means inferring all the crates in it, then building each one.
@@ -553,11 +553,11 @@ impl CtxMethods for BuildContext {
 
         let to_do = ~[pkg_src.libs.clone(), pkg_src.mains.clone(),
                       pkg_src.tests.clone(), pkg_src.benchs.clone()];
-        debug2!("In declare inputs for {}", id.to_str());
+        debug!("In declare inputs for {}", id.to_str());
         for cs in to_do.iter() {
             for c in cs.iter() {
                 let path = pkg_src.start_dir.join(&c.file);
-                debug2!("Recording input: {}", path.display());
+                debug!("Recording input: {}", path.display());
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 inputs.push((~"file", path.as_str().unwrap().to_owned()));
                 build_inputs.push(path);
@@ -568,7 +568,7 @@ impl CtxMethods for BuildContext {
                                            build_inputs,
                                            &pkg_src.destination_workspace,
                                            &id).map(|s| Path::new(s.as_slice()));
-        debug2!("install: id = {}, about to call discover_outputs, {:?}",
+        debug!("install: id = {}, about to call discover_outputs, {:?}",
                id.to_str(), result.map(|p| p.display().to_str()));
         installed_files = installed_files + result;
         note(format!("Installed package {} to {}",
@@ -585,7 +585,7 @@ impl CtxMethods for BuildContext {
                         id: &PkgId) -> ~[~str] {
         use conditions::copy_failed::cond;
 
-        debug2!("install_no_build: assuming {} comes from {} with target {}",
+        debug!("install_no_build: assuming {} comes from {} with target {}",
                id.to_str(), build_workspace.display(), target_workspace.display());
 
         // Now copy stuff into the install dirs
@@ -595,7 +595,7 @@ impl CtxMethods for BuildContext {
         let target_lib = maybe_library.as_ref()
             .map(|_| target_library_in_workspace(id, target_workspace));
 
-        debug2!("target_exec = {} target_lib = {:?} \
+        debug!("target_exec = {} target_lib = {:?} \
                maybe_executable = {:?} maybe_library = {:?}",
                target_exec.display(), target_lib,
                maybe_executable, maybe_library);
@@ -641,7 +641,7 @@ impl CtxMethods for BuildContext {
 
 
                 for exec in subex.iter() {
-                    debug2!("Copying: {} -> {}", exec.display(), sub_target_ex.display());
+                    debug!("Copying: {} -> {}", exec.display(), sub_target_ex.display());
                     if !(os::mkdir_recursive(&sub_target_ex.dir_path(), U_RWX) &&
                          os::copy_file(exec, &sub_target_ex)) {
                         cond.raise(((*exec).clone(), sub_target_ex.clone()));
@@ -661,7 +661,7 @@ impl CtxMethods for BuildContext {
                          os::copy_file(lib, &target_lib)) {
                         cond.raise(((*lib).clone(), target_lib.clone()));
                     }
-                    debug2!("3. discovering output {}", target_lib.display());
+                    debug!("3. discovering output {}", target_lib.display());
                     exe_thing.discover_output("binary",
                                               target_lib.as_str().unwrap(),
                                               workcache_support::digest_only_date(&target_lib));
@@ -673,13 +673,13 @@ impl CtxMethods for BuildContext {
     }
 
     fn prefer(&self, _id: &str, _vers: Option<~str>)  {
-        fail2!("prefer not yet implemented");
+        fail!("prefer not yet implemented");
     }
 
     fn test(&self, pkgid: &PkgId, workspace: &Path)  {
         match built_test_in_workspace(pkgid, workspace) {
             Some(test_exec) => {
-                debug2!("test: test_exec = {}", test_exec.display());
+                debug!("test: test_exec = {}", test_exec.display());
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 let status = run::process_status(test_exec.as_str().unwrap(), [~"--test"]);
                 os::set_exit_status(status);
@@ -700,11 +700,11 @@ impl CtxMethods for BuildContext {
     }
 
     fn uninstall(&self, _id: &str, _vers: Option<~str>)  {
-        fail2!("uninstall not yet implemented");
+        fail!("uninstall not yet implemented");
     }
 
     fn unprefer(&self, _id: &str, _vers: Option<~str>)  {
-        fail2!("unprefer not yet implemented");
+        fail!("unprefer not yet implemented");
     }
 }
 
@@ -880,9 +880,9 @@ pub fn main_args(args: &[~str]) -> int {
         _ => filesearch::get_or_default_sysroot()
     };
 
-    debug2!("Using sysroot: {}", sroot.display());
+    debug!("Using sysroot: {}", sroot.display());
     let ws = default_workspace();
-    debug2!("Will store workcache in {}", ws.display());
+    debug!("Will store workcache in {}", ws.display());
 
     let rm_args = remaining_args.clone();
     let sub_cmd = cmd.clone();
diff --git a/src/librustpkg/search.rs b/src/librustpkg/search.rs
index 080ba461f05..aec4e95f8e2 100644
--- a/src/librustpkg/search.rs
+++ b/src/librustpkg/search.rs
@@ -17,7 +17,7 @@ use version::Version;
 /// FIXME #8711: This ignores the desired version.
 pub fn find_installed_library_in_rust_path(pkg_path: &Path, _version: &Version) -> Option<Path> {
     let rp = rust_path();
-    debug2!("find_installed_library_in_rust_path: looking for path {}",
+    debug!("find_installed_library_in_rust_path: looking for path {}",
             pkg_path.display());
     for p in rp.iter() {
         match installed_library_in_workspace(pkg_path, p) {
diff --git a/src/librustpkg/source_control.rs b/src/librustpkg/source_control.rs
index 3c879af34cf..9a571e07570 100644
--- a/src/librustpkg/source_control.rs
+++ b/src/librustpkg/source_control.rs
@@ -23,14 +23,14 @@ use path_util::chmod_read_only;
 /// Returns `CheckedOutSources` if the clone succeeded.
 pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult {
     if os::path_exists(source) {
-        debug2!("{} exists locally! Cloning it into {}",
+        debug!("{} exists locally! Cloning it into {}",
                 source.display(), target.display());
         // Ok to use target here; we know it will succeed
         assert!(os::path_is_dir(source));
         assert!(is_git_dir(source));
 
         if !os::path_exists(target) {
-            debug2!("Running: git clone {} {}", source.display(), target.display());
+            debug!("Running: git clone {} {}", source.display(), target.display());
             // FIXME (#9639): This needs to handle non-utf8 paths
             let outp = run::process_output("git", [~"clone",
                                                    source.as_str().unwrap().to_owned(),
@@ -44,7 +44,7 @@ pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult
                 match v {
                     &ExactRevision(ref s) => {
                         let git_dir = target.join(".git");
-                        debug2!("`Running: git --work-tree={} --git-dir={} checkout {}",
+                        debug!("`Running: git --work-tree={} --git-dir={} checkout {}",
                                 *s, target.display(), git_dir.display());
                         // FIXME (#9639: This needs to handle non-utf8 paths
                         let outp = run::process_output("git",
@@ -65,7 +65,7 @@ pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult
             // case where a version was requested, but I haven't implemented it.
             assert!(*v == NoVersion);
             let git_dir = target.join(".git");
-            debug2!("Running: git --work-tree={} --git-dir={} pull --no-edit {}",
+            debug!("Running: git --work-tree={} --git-dir={} pull --no-edit {}",
                     target.display(), git_dir.display(), source.display());
             // FIXME (#9639: This needs to handle non-utf8 paths
             let args = [format!("--work-tree={}", target.as_str().unwrap().to_owned()),
@@ -111,8 +111,8 @@ pub fn git_clone_url(source: &str, target: &Path, v: &Version) {
     let outp = run::process_output("git", [~"clone", source.to_owned(),
                                            target.as_str().unwrap().to_owned()]);
     if outp.status != 0 {
-         debug2!("{}", str::from_utf8_owned(outp.output.clone()));
-         debug2!("{}", str::from_utf8_owned(outp.error));
+         debug!("{}", str::from_utf8_owned(outp.output.clone()));
+         debug!("{}", str::from_utf8_owned(outp.error));
          cond.raise((source.to_owned(), target.clone()))
     }
     else {
@@ -121,8 +121,8 @@ pub fn git_clone_url(source: &str, target: &Path, v: &Version) {
                     let outp = process_output_in_cwd("git", [~"checkout", s.to_owned()],
                                                          target);
                     if outp.status != 0 {
-                        debug2!("{}", str::from_utf8_owned(outp.output.clone()));
-                        debug2!("{}", str::from_utf8_owned(outp.error));
+                        debug!("{}", str::from_utf8_owned(outp.output.clone()));
+                        debug!("{}", str::from_utf8_owned(outp.error));
                         cond.raise((source.to_owned(), target.clone()))
                     }
             }
diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs
index 08c0fb72bf3..58c6b4ff81f 100644
--- a/src/librustpkg/tests.rs
+++ b/src/librustpkg/tests.rs
@@ -115,12 +115,12 @@ fn mk_temp_workspace(short_name: &Path, version: &Version) -> (TempDir, Path) {
                                                               short_name.as_str().unwrap(),
                                                               version.to_str())]);
 
-    debug2!("Created {} and does it exist? {:?}", package_dir.display(),
+    debug!("Created {} and does it exist? {:?}", package_dir.display(),
           os::path_is_dir(&package_dir));
     // Create main, lib, test, and bench files
-    debug2!("mk_workspace: creating {}", package_dir.display());
+    debug!("mk_workspace: creating {}", package_dir.display());
     assert!(os::mkdir_recursive(&package_dir, U_RWX));
-    debug2!("Created {} and does it exist? {:?}", package_dir.display(),
+    debug!("Created {} and does it exist? {:?}", package_dir.display(),
           os::path_is_dir(&package_dir));
     // Create main, lib, test, and bench files
 
@@ -146,7 +146,7 @@ fn run_git(args: &[~str], env: Option<~[(~str, ~str)]>, cwd: &Path, err_msg: &st
     });
     let rslt = prog.finish_with_output();
     if rslt.status != 0 {
-        fail2!("{} [git returned {:?}, output = {}, error = {}]", err_msg,
+        fail!("{} [git returned {:?}, output = {}, error = {}]", err_msg,
            rslt.status, str::from_utf8(rslt.output), str::from_utf8(rslt.error));
     }
 }
@@ -159,7 +159,7 @@ fn init_git_repo(p: &Path) -> TempDir {
     let work_dir = tmp.path().join(p);
     let work_dir_for_opts = work_dir.clone();
     assert!(os::mkdir_recursive(&work_dir, U_RWX));
-    debug2!("Running: git init in {}", work_dir.display());
+    debug!("Running: git init in {}", work_dir.display());
     run_git([~"init"], None, &work_dir_for_opts,
         format!("Couldn't initialize git repository in {}", work_dir.display()));
     // Add stuff to the dir so that git tag succeeds
@@ -239,7 +239,7 @@ fn rustpkg_exec() -> Path {
             second_try
         }
         else {
-            fail2!("in rustpkg test, can't find an installed rustpkg");
+            fail!("in rustpkg test, can't find an installed rustpkg");
         }
     }
 }
@@ -247,7 +247,7 @@ fn rustpkg_exec() -> Path {
 fn command_line_test(args: &[~str], cwd: &Path) -> ProcessOutput {
     match command_line_test_with_env(args, cwd, None) {
         Success(r) => r,
-        Fail(error) => fail2!("Command line test failed with error {}", error)
+        Fail(error) => fail!("Command line test failed with error {}", error)
     }
 }
 
@@ -260,9 +260,9 @@ fn command_line_test_expect_fail(args: &[~str],
                                  env: Option<~[(~str, ~str)]>,
                                  expected_exitcode: int) {
     match command_line_test_with_env(args, cwd, env) {
-        Success(_) => fail2!("Should have failed with {}, but it succeeded", expected_exitcode),
+        Success(_) => fail!("Should have failed with {}, but it succeeded", expected_exitcode),
         Fail(error) if error == expected_exitcode => (), // ok
-        Fail(other) => fail2!("Expected to fail with {}, but failed with {} instead",
+        Fail(other) => fail!("Expected to fail with {}, but failed with {} instead",
                               expected_exitcode, other)
     }
 }
@@ -284,7 +284,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
         Some(ref pairs) => pairs.map(|&(ref k, ref v)| { format!("{}={}", *k, *v) }).connect(","),
         None        => ~""
     };
-    debug2!("{} cd {}; {} {}", env_str, cwd.display(), cmd, args.connect(" "));
+    debug!("{} cd {}; {} {}", env_str, cwd.display(), cmd, args.connect(" "));
     assert!(os::path_is_dir(&*cwd));
     let cwd = (*cwd).clone();
     let mut prog = run::Process::new(cmd, args, run::ProcessOptions {
@@ -295,7 +295,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
         err_fd: None
     });
     let output = prog.finish_with_output();
-    debug2!("Output from command {} with args {:?} was {} \\{{}\\}[{:?}]",
+    debug!("Output from command {} with args {:?} was {} \\{{}\\}[{:?}]",
                     cmd, args, str::from_utf8(output.output),
                    str::from_utf8(output.error),
                    output.status);
@@ -306,7 +306,7 @@ So tests that use this need to check the existence of a file
 to make sure the command succeeded
 */
     if output.status != 0 {
-        debug2!("Command {} {:?} failed with exit code {:?}; its output was --- {} ---",
+        debug!("Command {} {:?} failed with exit code {:?}; its output was --- {} ---",
               cmd, args, output.status,
               str::from_utf8(output.output) + str::from_utf8(output.error));
         Fail(output.status)
@@ -318,7 +318,7 @@ to make sure the command succeeded
 
 fn create_local_package(pkgid: &PkgId) -> TempDir {
     let (workspace, parent_dir) = mk_temp_workspace(&pkgid.path, &pkgid.version);
-    debug2!("Created empty package dir for {}, returning {}", pkgid.to_str(), parent_dir.display());
+    debug!("Created empty package dir for {}, returning {}", pkgid.to_str(), parent_dir.display());
     workspace
 }
 
@@ -328,7 +328,7 @@ fn create_local_package_in(pkgid: &PkgId, pkgdir: &Path) -> Path {
 
     // Create main, lib, test, and bench files
     assert!(os::mkdir_recursive(&package_dir, U_RWX));
-    debug2!("Created {} and does it exist? {:?}", package_dir.display(),
+    debug!("Created {} and does it exist? {:?}", package_dir.display(),
           os::path_is_dir(&package_dir));
     // Create main, lib, test, and bench files
 
@@ -344,7 +344,7 @@ fn create_local_package_in(pkgid: &PkgId, pkgdir: &Path) -> Path {
 }
 
 fn create_local_package_with_test(pkgid: &PkgId) -> TempDir {
-    debug2!("Dry run -- would create package {:?} with test", pkgid);
+    debug!("Dry run -- would create package {:?} with test", pkgid);
     create_local_package(pkgid) // Already has tests???
 }
 
@@ -363,7 +363,7 @@ fn create_local_package_with_dep(pkgid: &PkgId, subord_pkgid: &PkgId) -> TempDir
 
 fn create_local_package_with_custom_build_hook(pkgid: &PkgId,
                                                custom_build_hook: &str) -> TempDir {
-    debug2!("Dry run -- would create package {} with custom build hook {}",
+    debug!("Dry run -- would create package {} with custom build hook {}",
            pkgid.to_str(), custom_build_hook);
     create_local_package(pkgid)
     // actually write the pkg.rs with the custom build hook
@@ -375,9 +375,9 @@ fn assert_lib_exists(repo: &Path, pkg_path: &Path, v: Version) {
 }
 
 fn lib_exists(repo: &Path, pkg_path: &Path, _v: Version) -> bool { // ??? version?
-    debug2!("assert_lib_exists: repo = {}, pkg_path = {}", repo.display(), pkg_path.display());
+    debug!("assert_lib_exists: repo = {}, pkg_path = {}", repo.display(), pkg_path.display());
     let lib = installed_library_in_workspace(pkg_path, repo);
-    debug2!("assert_lib_exists: checking whether {:?} exists", lib);
+    debug!("assert_lib_exists: checking whether {:?} exists", lib);
     lib.is_some() && {
         let libname = lib.get_ref();
         os::path_exists(libname) && is_rwx(libname)
@@ -389,13 +389,13 @@ fn assert_executable_exists(repo: &Path, short_name: &str) {
 }
 
 fn executable_exists(repo: &Path, short_name: &str) -> bool {
-    debug2!("executable_exists: repo = {}, short_name = {}", repo.display(), short_name);
+    debug!("executable_exists: repo = {}, short_name = {}", repo.display(), short_name);
     let exec = target_executable_in_workspace(&PkgId::new(short_name), repo);
     os::path_exists(&exec) && is_rwx(&exec)
 }
 
 fn test_executable_exists(repo: &Path, short_name: &str) -> bool {
-    debug2!("test_executable_exists: repo = {}, short_name = {}", repo.display(), short_name);
+    debug!("test_executable_exists: repo = {}, short_name = {}", repo.display(), short_name);
     let exec = built_test_in_workspace(&PkgId::new(short_name), repo);
     do exec.map_default(false) |exec| {
         os::path_exists(&exec) && is_rwx(&exec)
@@ -414,7 +414,7 @@ fn assert_built_executable_exists(repo: &Path, short_name: &str) {
 }
 
 fn built_executable_exists(repo: &Path, short_name: &str) -> bool {
-    debug2!("assert_built_executable_exists: repo = {}, short_name = {}",
+    debug!("assert_built_executable_exists: repo = {}, short_name = {}",
             repo.display(), short_name);
     let exec = built_executable_in_workspace(&PkgId::new(short_name), repo);
     exec.is_some() && {
@@ -457,7 +457,7 @@ fn assert_built_library_exists(repo: &Path, short_name: &str) {
 }
 
 fn built_library_exists(repo: &Path, short_name: &str) -> bool {
-    debug2!("assert_built_library_exists: repo = {}, short_name = {}", repo.display(), short_name);
+    debug!("assert_built_library_exists: repo = {}, short_name = {}", repo.display(), short_name);
     let lib = built_library_in_workspace(&PkgId::new(short_name), repo);
     lib.is_some() && {
         let libname = lib.get_ref();
@@ -479,7 +479,7 @@ fn command_line_test_output_with_env(args: &[~str], env: ~[(~str, ~str)]) -> ~[~
     let mut result = ~[];
     let p_output = match command_line_test_with_env(args,
         &os::getcwd(), Some(env)) {
-        Fail(_) => fail2!("Command-line test failed"),
+        Fail(_) => fail!("Command-line test failed"),
         Success(r) => r
     };
     let test_output = str::from_utf8(p_output.output);
@@ -491,7 +491,7 @@ fn command_line_test_output_with_env(args: &[~str], env: ~[(~str, ~str)]) -> ~[~
 
 // assumes short_name and path are one and the same -- I should fix
 fn lib_output_file_name(workspace: &Path, short_name: &str) -> Path {
-    debug2!("lib_output_file_name: given {} and short name {}",
+    debug!("lib_output_file_name: given {} and short name {}",
            workspace.display(), short_name);
     library_in_workspace(&Path::new(short_name),
                          short_name,
@@ -549,11 +549,11 @@ fn frob_source_file(workspace: &Path, pkgid: &PkgId, filename: &str) {
     let pkg_src_dir = workspace.join_many([~"src", pkgid.to_str()]);
     let mut maybe_p = None;
     let maybe_file = pkg_src_dir.join(filename);
-    debug2!("Trying to frob {} -- {}", pkg_src_dir.display(), filename);
+    debug!("Trying to frob {} -- {}", pkg_src_dir.display(), filename);
     if os::path_exists(&maybe_file) {
         maybe_p = Some(maybe_file);
     }
-    debug2!("Frobbed? {:?}", maybe_p);
+    debug!("Frobbed? {:?}", maybe_p);
     match maybe_p {
         Some(ref p) => {
             let w = io::file_writer(p, &[io::Append]);
@@ -562,7 +562,7 @@ fn frob_source_file(workspace: &Path, pkgid: &PkgId, filename: &str) {
                 Ok(w)  => w.write_line("/* hi */")
             }
         }
-        None => fail2!("frob_source_file failed to find a source file in {}",
+        None => fail!("frob_source_file failed to find a source file in {}",
                            pkg_src_dir.display())
     }
 }
@@ -573,7 +573,7 @@ fn test_make_dir_rwx() {
     let dir = temp.join("quux");
     assert!(!os::path_exists(&dir) ||
             os::remove_dir_recursive(&dir));
-    debug2!("Trying to make {}", dir.display());
+    debug!("Trying to make {}", dir.display());
     assert!(make_dir_rwx(&dir));
     assert!(os::path_is_dir(&dir));
     assert!(is_rwx(&dir));
@@ -589,12 +589,12 @@ fn test_install_valid() {
     use path_util::installed_library_in_workspace;
 
     let sysroot = test_sysroot();
-    debug2!("sysroot = {}", sysroot.display());
+    debug!("sysroot = {}", sysroot.display());
     let temp_pkg_id = fake_pkg();
     let (temp_workspace, _pkg_dir) = mk_temp_workspace(&temp_pkg_id.path, &NoVersion);
     let temp_workspace = temp_workspace.path();
     let ctxt = fake_ctxt(sysroot, temp_workspace);
-    debug2!("temp_workspace = {}", temp_workspace.display());
+    debug!("temp_workspace = {}", temp_workspace.display());
     // should have test, bench, lib, and main
     let src = PkgSrc::new(temp_workspace.clone(),
                           temp_workspace.clone(),
@@ -603,19 +603,19 @@ fn test_install_valid() {
     ctxt.install(src, &Everything);
     // Check that all files exist
     let exec = target_executable_in_workspace(&temp_pkg_id, temp_workspace);
-    debug2!("exec = {}", exec.display());
+    debug!("exec = {}", exec.display());
     assert!(os::path_exists(&exec));
     assert!(is_rwx(&exec));
 
     let lib = installed_library_in_workspace(&temp_pkg_id.path, temp_workspace);
-    debug2!("lib = {:?}", lib);
+    debug!("lib = {:?}", lib);
     assert!(lib.as_ref().map_default(false, |l| os::path_exists(l)));
     assert!(lib.as_ref().map_default(false, |l| is_rwx(l)));
 
     // And that the test and bench executables aren't installed
     assert!(!os::path_exists(&target_test_in_workspace(&temp_pkg_id, temp_workspace)));
     let bench = target_bench_in_workspace(&temp_pkg_id, temp_workspace);
-    debug2!("bench = {}", bench.display());
+    debug!("bench = {}", bench.display());
     assert!(!os::path_exists(&bench));
 
     // Make sure the db isn't dirty, so that it doesn't try to save()
@@ -656,19 +656,19 @@ fn test_install_valid_external() {
 
     // Check that all files exist
     let exec = target_executable_in_workspace(&temp_pkg_id, temp_workspace);
-    debug2!("exec = {}", exec.display());
+    debug!("exec = {}", exec.display());
     assert!(os::path_exists(&exec));
     assert!(is_rwx(&exec));
 
     let lib = installed_library_in_workspace(&temp_pkg_id.path, temp_workspace);
-    debug2!("lib = {:?}", lib);
+    debug!("lib = {:?}", lib);
     assert!(lib.as_ref().map_default(false, |l| os::path_exists(l)));
     assert!(lib.as_ref().map_default(false, |l| is_rwx(l)));
 
     // And that the test and bench executables aren't installed
     assert!(!os::path_exists(&target_test_in_workspace(&temp_pkg_id, temp_workspace)));
     let bench = target_bench_in_workspace(&temp_pkg_id, temp_workspace);
-    debug2!("bench = {}", bench.display());
+    debug!("bench = {}", bench.display());
     assert!(!os::path_exists(&bench));
 
 }
@@ -689,9 +689,9 @@ fn test_install_git() {
     let temp_pkg_id = git_repo_pkg();
     let repo = init_git_repo(&temp_pkg_id.path);
     let repo = repo.path();
-    debug2!("repo = {}", repo.display());
+    debug!("repo = {}", repo.display());
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test-pkg"]);
-    debug2!("repo_subdir = {}", repo_subdir.display());
+    debug!("repo_subdir = {}", repo_subdir.display());
 
     writeFile(&repo_subdir.join("main.rs"),
               "fn main() { let _x = (); }");
@@ -703,16 +703,16 @@ fn test_install_git() {
               "#[bench] pub fn f() { (); }");
     add_git_tag(&repo_subdir, ~"0.1"); // this has the effect of committing the files
 
-    debug2!("test_install_git: calling rustpkg install {} in {}",
+    debug!("test_install_git: calling rustpkg install {} in {}",
            temp_pkg_id.path.display(), repo.display());
     // should have test, bench, lib, and main
     // FIXME (#9639): This needs to handle non-utf8 paths
     command_line_test([~"install", temp_pkg_id.path.as_str().unwrap().to_owned()], repo);
     let ws = repo.join(".rust");
     // Check that all files exist
-    debug2!("Checking for files in {}", ws.display());
+    debug!("Checking for files in {}", ws.display());
     let exec = target_executable_in_workspace(&temp_pkg_id, &ws);
-    debug2!("exec = {}", exec.display());
+    debug!("exec = {}", exec.display());
     assert!(os::path_exists(&exec));
     assert!(is_rwx(&exec));
     let _built_lib =
@@ -728,9 +728,9 @@ fn test_install_git() {
     // And that the test and bench executables aren't installed
     let test = target_test_in_workspace(&temp_pkg_id, &ws);
     assert!(!os::path_exists(&test));
-    debug2!("test = {}", test.display());
+    debug!("test = {}", test.display());
     let bench = target_bench_in_workspace(&temp_pkg_id, &ws);
-    debug2!("bench = {}", bench.display());
+    debug!("bench = {}", bench.display());
     assert!(!os::path_exists(&bench));
 }
 
@@ -784,7 +784,7 @@ fn test_package_version() {
     let repo = init_git_repo(&Path::new(local_path));
     let repo = repo.path();
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test_pkg_version"]);
-    debug2!("Writing files in: {}", repo_subdir.display());
+    debug!("Writing files in: {}", repo_subdir.display());
     writeFile(&repo_subdir.join("main.rs"),
               "fn main() { let _x = (); }");
     writeFile(&repo_subdir.join("lib.rs"),
@@ -823,7 +823,7 @@ fn test_package_request_version() {
     let repo = init_git_repo(&Path::new(local_path));
     let repo = repo.path();
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test_pkg_version"]);
-    debug2!("Writing files in: {}", repo_subdir.display());
+    debug!("Writing files in: {}", repo_subdir.display());
     writeFile(&repo_subdir.join("main.rs"),
               "fn main() { let _x = (); }");
     writeFile(&repo_subdir.join("lib.rs"),
@@ -842,7 +842,7 @@ fn test_package_request_version() {
     assert!(match installed_library_in_workspace(&Path::new("test_pkg_version"),
                                                  &repo.join(".rust")) {
         Some(p) => {
-            debug2!("installed: {}", p.display());
+            debug!("installed: {}", p.display());
             let suffix = format!("0.3{}", os::consts::DLL_SUFFIX);
             p.as_vec().ends_with(suffix.as_bytes())
         }
@@ -854,7 +854,7 @@ fn test_package_request_version() {
 
     let mut dir = target_build_dir(&repo.join(".rust"));
     dir.push(&Path::new("src/mockgithub.com/catamorphism/test_pkg_version-0.3"));
-    debug2!("dir = {}", dir.display());
+    debug!("dir = {}", dir.display());
     assert!(os::path_is_dir(&dir));
     assert!(os::path_exists(&dir.join("version-0.3-file.txt")));
     assert!(!os::path_exists(&dir.join("version-0.4-file.txt")));
@@ -874,7 +874,7 @@ fn rustpkg_library_target() {
     let foo_repo = foo_repo.path();
     let package_dir = foo_repo.join("foo");
 
-    debug2!("Writing files in: {}", package_dir.display());
+    debug!("Writing files in: {}", package_dir.display());
     writeFile(&package_dir.join("main.rs"),
               "fn main() { let _x = (); }");
     writeFile(&package_dir.join("lib.rs"),
@@ -901,14 +901,14 @@ fn rustpkg_local_pkg() {
 fn package_script_with_default_build() {
     let dir = create_local_package(&PkgId::new("fancy-lib"));
     let dir = dir.path();
-    debug2!("dir = {}", dir.display());
+    debug!("dir = {}", dir.display());
     let mut source = test_sysroot().dir_path();
     source.pop(); source.pop();
     source.push_many(["src", "librustpkg", "testsuite", "pass", "src", "fancy-lib", "pkg.rs"]);
-    debug2!("package_script_with_default_build: {}", source.display());
+    debug!("package_script_with_default_build: {}", source.display());
     if !os::copy_file(&source,
                       &dir.join_many(["src", "fancy-lib-0.1", "pkg.rs"])) {
-        fail2!("Couldn't copy file");
+        fail!("Couldn't copy file");
     }
     command_line_test([~"install", ~"fancy-lib"], dir);
     assert_lib_exists(dir, &Path::new("fancy-lib"), NoVersion);
@@ -924,7 +924,7 @@ fn rustpkg_build_no_arg() {
 
     writeFile(&package_dir.join("main.rs"),
               "fn main() { let _x = (); }");
-    debug2!("build_no_arg: dir = {}", package_dir.display());
+    debug!("build_no_arg: dir = {}", package_dir.display());
     command_line_test([~"build"], &package_dir);
     assert_built_executable_exists(&tmp, "foo");
 }
@@ -937,7 +937,7 @@ fn rustpkg_install_no_arg() {
     assert!(os::mkdir_recursive(&package_dir, U_RWX));
     writeFile(&package_dir.join("lib.rs"),
               "fn main() { let _x = (); }");
-    debug2!("install_no_arg: dir = {}", package_dir.display());
+    debug!("install_no_arg: dir = {}", package_dir.display());
     command_line_test([~"install"], &package_dir);
     assert_lib_exists(&tmp, &Path::new("foo"), NoVersion);
 }
@@ -951,7 +951,7 @@ fn rustpkg_clean_no_arg() {
 
     writeFile(&package_dir.join("main.rs"),
               "fn main() { let _x = (); }");
-    debug2!("clean_no_arg: dir = {}", package_dir.display());
+    debug!("clean_no_arg: dir = {}", package_dir.display());
     command_line_test([~"build"], &package_dir);
     assert_built_executable_exists(&tmp, "foo");
     command_line_test([~"clean"], &package_dir);
@@ -963,11 +963,11 @@ fn rustpkg_clean_no_arg() {
 fn rust_path_test() {
     let dir_for_path = TempDir::new("more_rust").expect("rust_path_test failed");
     let dir = mk_workspace(dir_for_path.path(), &Path::new("foo"), &NoVersion);
-    debug2!("dir = {}", dir.display());
+    debug!("dir = {}", dir.display());
     writeFile(&dir.join("main.rs"), "fn main() { let _x = (); }");
 
     let cwd = os::getcwd();
-    debug2!("cwd = {}", cwd.display());
+    debug!("cwd = {}", cwd.display());
                                      // use command_line_test_with_env
     // FIXME (#9639): This needs to handle non-utf8 paths
     command_line_test_with_env([~"install", ~"foo"],
@@ -1080,7 +1080,7 @@ fn install_check_duplicates() {
     let mut contents = ~[];
     let check_dups = |p: &PkgId| {
         if contents.contains(p) {
-            fail2!("package {} appears in `list` output more than once", p.path.display());
+            fail!("package {} appears in `list` output more than once", p.path.display());
         }
         else {
             contents.push((*p).clone());
@@ -1104,8 +1104,8 @@ fn no_rebuilding() {
 
     match command_line_test_partial([~"build", ~"foo"], workspace) {
         Success(*) => (), // ok
-        Fail(status) if status == 65 => fail2!("no_rebuilding failed: it tried to rebuild bar"),
-        Fail(_) => fail2!("no_rebuilding failed for some other reason")
+        Fail(status) if status == 65 => fail!("no_rebuilding failed: it tried to rebuild bar"),
+        Fail(_) => fail!("no_rebuilding failed for some other reason")
     }
 }
 
@@ -1122,8 +1122,8 @@ fn no_rebuilding_dep() {
     assert!(chmod_read_only(&bar_lib));
     match command_line_test_partial([~"build", ~"foo"], workspace) {
         Success(*) => (), // ok
-        Fail(status) if status == 65 => fail2!("no_rebuilding_dep failed: it tried to rebuild bar"),
-        Fail(_) => fail2!("no_rebuilding_dep failed for some other reason")
+        Fail(status) if status == 65 => fail!("no_rebuilding_dep failed: it tried to rebuild bar"),
+        Fail(_) => fail!("no_rebuilding_dep failed for some other reason")
     }
 }
 
@@ -1141,9 +1141,9 @@ fn do_rebuild_dep_dates_change() {
     assert!(chmod_read_only(&bar_lib_name));
 
     match command_line_test_partial([~"build", ~"foo"], workspace) {
-        Success(*) => fail2!("do_rebuild_dep_dates_change failed: it didn't rebuild bar"),
+        Success(*) => fail!("do_rebuild_dep_dates_change failed: it didn't rebuild bar"),
         Fail(status) if status == 65 => (), // ok
-        Fail(_) => fail2!("do_rebuild_dep_dates_change failed for some other reason")
+        Fail(_) => fail!("do_rebuild_dep_dates_change failed for some other reason")
     }
 }
 
@@ -1162,9 +1162,9 @@ fn do_rebuild_dep_only_contents_change() {
 
     // should adjust the datestamp
     match command_line_test_partial([~"build", ~"foo"], workspace) {
-        Success(*) => fail2!("do_rebuild_dep_only_contents_change failed: it didn't rebuild bar"),
+        Success(*) => fail!("do_rebuild_dep_only_contents_change failed: it didn't rebuild bar"),
         Fail(status) if status == 65 => (), // ok
-        Fail(_) => fail2!("do_rebuild_dep_only_contents_change failed for some other reason")
+        Fail(_) => fail!("do_rebuild_dep_only_contents_change failed for some other reason")
     }
 }
 
@@ -1270,7 +1270,7 @@ fn test_extern_mod() {
     });
     let outp = prog.finish_with_output();
     if outp.status != 0 {
-        fail2!("output was {}, error was {}",
+        fail!("output was {}, error was {}",
               str::from_utf8(outp.output),
               str::from_utf8(outp.error));
     }
@@ -1304,7 +1304,7 @@ fn test_extern_mod_simpler() {
     let rustpkg_exec = rustpkg_exec();
     let rustc = rustpkg_exec.with_filename("rustc");
     let test_sys = test_sysroot();
-    debug2!("RUST_PATH={} {} {} \n --sysroot {} -o {}",
+    debug!("RUST_PATH={} {} {} \n --sysroot {} -o {}",
                      lib_depend_dir.display(),
                      rustc.display(),
                      main_file.display(),
@@ -1325,7 +1325,7 @@ fn test_extern_mod_simpler() {
     });
     let outp = prog.finish_with_output();
     if outp.status != 0 {
-        fail2!("output was {}, error was {}",
+        fail!("output was {}, error was {}",
               str::from_utf8(outp.output),
               str::from_utf8(outp.error));
     }
@@ -1340,7 +1340,7 @@ fn test_import_rustpkg() {
     writeFile(&workspace.join_many(["src", "foo-0.1", "pkg.rs"]),
               "extern mod rustpkg; fn main() {}");
     command_line_test([~"build", ~"foo"], workspace);
-    debug2!("workspace = {}", workspace.display());
+    debug!("workspace = {}", workspace.display());
     assert!(os::path_exists(&target_build_dir(workspace).join("foo").join(format!("pkg{}",
         os::EXE_SUFFIX))));
 }
@@ -1351,9 +1351,9 @@ fn test_macro_pkg_script() {
     let workspace = create_local_package(&p_id);
     let workspace = workspace.path();
     writeFile(&workspace.join_many(["src", "foo-0.1", "pkg.rs"]),
-              "extern mod rustpkg; fn main() { debug2!(\"Hi\"); }");
+              "extern mod rustpkg; fn main() { debug!(\"Hi\"); }");
     command_line_test([~"build", ~"foo"], workspace);
-    debug2!("workspace = {}", workspace.display());
+    debug!("workspace = {}", workspace.display());
     assert!(os::path_exists(&target_build_dir(workspace).join("foo").join(format!("pkg{}",
         os::EXE_SUFFIX))));
 }
@@ -1367,9 +1367,9 @@ fn multiple_workspaces() {
     let (a_loc, _pkg_dir) = mk_temp_workspace(&Path::new("foo"), &NoVersion);
     let (b_loc, _pkg_dir) = mk_temp_workspace(&Path::new("foo"), &NoVersion);
     let (a_loc, b_loc) = (a_loc.path(), b_loc.path());
-    debug2!("Trying to install foo in {}", a_loc.display());
+    debug!("Trying to install foo in {}", a_loc.display());
     command_line_test([~"install", ~"foo"], a_loc);
-    debug2!("Trying to install foo in {}", b_loc.display());
+    debug!("Trying to install foo in {}", b_loc.display());
     command_line_test([~"install", ~"foo"], b_loc);
     // FIXME (#9639): This needs to handle non-utf8 paths
     let env = Some(~[(~"RUST_PATH", format!("{}:{}", a_loc.as_str().unwrap(),
@@ -1443,7 +1443,7 @@ fn rust_path_hack_cwd() {
    // FIXME (#9639): This needs to handle non-utf8 paths
    let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
    command_line_test_with_env([~"install", ~"--rust-path-hack", ~"foo"], &cwd, rust_path);
-   debug2!("Checking that foo exists in {}", dest_workspace.display());
+   debug!("Checking that foo exists in {}", dest_workspace.display());
    assert_lib_exists(dest_workspace, &Path::new("foo"), NoVersion);
    assert_built_library_exists(dest_workspace, "foo");
    assert!(!lib_exists(&cwd, &Path::new("foo"), NoVersion));
@@ -1464,7 +1464,7 @@ fn rust_path_hack_multi_path() {
    // FIXME (#9639): This needs to handle non-utf8 paths
    let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
    command_line_test_with_env([~"install", ~"--rust-path-hack", name.clone()], &subdir, rust_path);
-   debug2!("Checking that {} exists in {}", name, dest_workspace.display());
+   debug!("Checking that {} exists in {}", name, dest_workspace.display());
    assert_lib_exists(dest_workspace, &Path::new("quux"), NoVersion);
    assert_built_library_exists(dest_workspace, name);
    assert!(!lib_exists(&subdir, &Path::new("quux"), NoVersion));
@@ -1485,7 +1485,7 @@ fn rust_path_hack_install_no_arg() {
    // FIXME (#9639): This needs to handle non-utf8 paths
    let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
    command_line_test_with_env([~"install", ~"--rust-path-hack"], &source_dir, rust_path);
-   debug2!("Checking that foo exists in {}", dest_workspace.display());
+   debug!("Checking that foo exists in {}", dest_workspace.display());
    assert_lib_exists(dest_workspace, &Path::new("foo"), NoVersion);
    assert_built_library_exists(dest_workspace, "foo");
    assert!(!lib_exists(&source_dir, &Path::new("foo"), NoVersion));
@@ -1505,7 +1505,7 @@ fn rust_path_hack_build_no_arg() {
    // FIXME (#9639): This needs to handle non-utf8 paths
    let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
    command_line_test_with_env([~"build", ~"--rust-path-hack"], &source_dir, rust_path);
-   debug2!("Checking that foo exists in {}", dest_workspace.display());
+   debug!("Checking that foo exists in {}", dest_workspace.display());
    assert_built_library_exists(dest_workspace, "foo");
    assert!(!built_library_exists(&source_dir, "foo"));
 }
@@ -1515,7 +1515,7 @@ fn rust_path_install_target() {
     let dir_for_path = TempDir::new(
         "source_workspace").expect("rust_path_install_target failed");
     let mut dir = mk_workspace(dir_for_path.path(), &Path::new("foo"), &NoVersion);
-    debug2!("dir = {}", dir.display());
+    debug!("dir = {}", dir.display());
     writeFile(&dir.join("main.rs"), "fn main() { let _x = (); }");
     let dir_to_install_to = TempDir::new(
         "dest_workspace").expect("rust_path_install_target failed");
@@ -1696,7 +1696,7 @@ fn test_cfg_fail() {
                        ~"build",
                        ~"foo"],
                       workspace) {
-        Success(*) => fail2!("test_cfg_fail failed"),
+        Success(*) => fail!("test_cfg_fail failed"),
         _          => ()
     }
 }
@@ -1857,7 +1857,7 @@ fn pkgid_pointing_to_subdir() {
     writeFile(&foo_dir.join("lib.rs"), "pub fn f() {}");
     writeFile(&bar_dir.join("lib.rs"), "pub fn g() {}");
 
-    debug2!("Creating a file in {}", workspace.display());
+    debug!("Creating a file in {}", workspace.display());
     let testpkg_dir = workspace.join_many(["src", "testpkg-0.1"]);
     assert!(os::mkdir_recursive(&testpkg_dir, U_RWX));
 
@@ -1888,7 +1888,7 @@ fn test_recursive_deps() {
                "extern mod c; use c::g; pub fn f() { g(); }");
     // FIXME (#9639): This needs to handle non-utf8 paths
     let environment = Some(~[(~"RUST_PATH", b_workspace.as_str().unwrap().to_owned())]);
-    debug2!("RUST_PATH={}", b_workspace.display());
+    debug!("RUST_PATH={}", b_workspace.display());
     command_line_test_with_env([~"install", ~"a"],
                                a_workspace,
                                environment);
@@ -1908,7 +1908,7 @@ fn test_install_to_rust_path() {
     let rust_path = Some(~[(~"RUST_PATH",
                             format!("{}:{}", first_workspace.as_str().unwrap(),
                                     second_workspace.as_str().unwrap()))]);
-    debug2!("RUST_PATH={}:{}", first_workspace.display(), second_workspace.display());
+    debug!("RUST_PATH={}:{}", first_workspace.display(), second_workspace.display());
     let test_sys = test_sysroot();
     // FIXME (#9639): This needs to handle non-utf8 paths
     command_line_test_with_env([test_sys.as_str().unwrap().to_owned(),
@@ -2086,9 +2086,9 @@ fn test_rebuild_when_needed() {
     frob_source_file(foo_workspace, &foo_id, "test.rs");
     chmod_read_only(&test_executable);
     match command_line_test_partial([~"test", ~"foo"], foo_workspace) {
-        Success(*) => fail2!("test_rebuild_when_needed didn't rebuild"),
+        Success(*) => fail!("test_rebuild_when_needed didn't rebuild"),
         Fail(status) if status == 65 => (), // ok
-        Fail(_) => fail2!("test_rebuild_when_needed failed for some other reason")
+        Fail(_) => fail!("test_rebuild_when_needed failed for some other reason")
     }
 }
 
@@ -2106,8 +2106,8 @@ fn test_no_rebuilding() {
     chmod_read_only(&test_executable);
     match command_line_test_partial([~"test", ~"foo"], foo_workspace) {
         Success(*) => (), // ok
-        Fail(status) if status == 65 => fail2!("test_no_rebuilding failed: it rebuilt the tests"),
-        Fail(_) => fail2!("test_no_rebuilding failed for some other reason")
+        Fail(status) if status == 65 => fail!("test_no_rebuilding failed: it rebuilt the tests"),
+        Fail(_) => fail!("test_no_rebuilding failed for some other reason")
     }
 }
 
@@ -2118,9 +2118,9 @@ fn test_installed_read_only() {
     let temp_pkg_id = git_repo_pkg();
     let repo = init_git_repo(&temp_pkg_id.path);
     let repo = repo.path();
-    debug2!("repo = {}", repo.display());
+    debug!("repo = {}", repo.display());
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test-pkg"]);
-    debug2!("repo_subdir = {}", repo_subdir.display());
+    debug!("repo_subdir = {}", repo_subdir.display());
 
     writeFile(&repo_subdir.join("main.rs"),
               "fn main() { let _x = (); }");
@@ -2133,9 +2133,9 @@ fn test_installed_read_only() {
 
     let ws = repo.join(".rust");
     // Check that all files exist
-    debug2!("Checking for files in {}", ws.display());
+    debug!("Checking for files in {}", ws.display());
     let exec = target_executable_in_workspace(&temp_pkg_id, &ws);
-    debug2!("exec = {}", exec.display());
+    debug!("exec = {}", exec.display());
     assert!(os::path_exists(&exec));
     assert!(is_rwx(&exec));
     let built_lib =
@@ -2158,9 +2158,9 @@ fn test_installed_local_changes() {
     let temp_pkg_id = git_repo_pkg();
     let repo = init_git_repo(&temp_pkg_id.path);
     let repo = repo.path();
-    debug2!("repo = {}", repo.display());
+    debug!("repo = {}", repo.display());
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test-pkg"]);
-    debug2!("repo_subdir = {}", repo_subdir.display());
+    debug!("repo_subdir = {}", repo_subdir.display());
     assert!(os::mkdir_recursive(&repo.join_many([".rust", "src"]), U_RWX));
 
     writeFile(&repo_subdir.join("main.rs"),
@@ -2181,12 +2181,12 @@ fn test_installed_local_changes() {
                                                   "mockgithub.com",
                                                   "catamorphism",
                                                   "test-pkg-0.1"]);
-    debug2!("---- git clone {} {}", repo_subdir.display(), target_dir.display());
+    debug!("---- git clone {} {}", repo_subdir.display(), target_dir.display());
 
     let c_res = safe_git_clone(&repo_subdir, &NoVersion, &target_dir);
 
     match c_res {
-        DirToUse(_) => fail2!("test_installed_local_changes failed"),
+        DirToUse(_) => fail!("test_installed_local_changes failed"),
         CheckedOutSources => ()
     };
 
@@ -2232,9 +2232,9 @@ fn test_compile_error() {
     writeFile(&main_crate, "pub fn main() { if 42 != ~\"the answer\" { fail!(); } }");
     let result = command_line_test_partial([~"build", ~"foo"], foo_workspace);
     match result {
-        Success(*) => fail2!("Failed by succeeding!"), // should be a compile error
+        Success(*) => fail!("Failed by succeeding!"), // should be a compile error
         Fail(status) => {
-            debug2!("Failed with status {:?}... that's good, right?", status);
+            debug!("Failed with status {:?}... that's good, right?", status);
         }
     }
 }
diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs
index 345518eddc7..a3a4a07cfc7 100644
--- a/src/librustpkg/util.rs
+++ b/src/librustpkg/util.rs
@@ -175,7 +175,7 @@ pub fn compile_input(context: &BuildContext,
                      what: OutputType) -> Option<Path> {
     assert!(in_file.component_iter().nth(1).is_some());
     let input = driver::file_input(in_file.clone());
-    debug2!("compile_input: {} / {:?}", in_file.display(), what);
+    debug!("compile_input: {} / {:?}", in_file.display(), what);
     // tjc: by default, use the package ID name as the link name
     // not sure if we should support anything else
 
@@ -186,10 +186,10 @@ pub fn compile_input(context: &BuildContext,
 
     let binary = os::args()[0].to_managed();
 
-    debug2!("flags: {}", flags.connect(" "));
-    debug2!("cfgs: {}", cfgs.connect(" "));
+    debug!("flags: {}", flags.connect(" "));
+    debug!("cfgs: {}", cfgs.connect(" "));
     let csysroot = context.sysroot();
-    debug2!("compile_input's sysroot = {}", csysroot.display());
+    debug!("compile_input's sysroot = {}", csysroot.display());
 
     let crate_type = match what {
         Lib => lib_crate,
@@ -206,7 +206,7 @@ pub fn compile_input(context: &BuildContext,
                           + context.flag_strs()
                           + cfgs.flat_map(|c| { ~[~"--cfg", (*c).clone()] }),
                           driver::optgroups()).unwrap();
-    debug2!("rustc flags: {:?}", matches);
+    debug!("rustc flags: {:?}", matches);
 
     // Hack so that rustpkg can run either out of a rustc target dir,
     // or the host dir
@@ -221,8 +221,8 @@ pub fn compile_input(context: &BuildContext,
         p
     };
     let csysroot = context.sysroot();
-    debug2!("compile_input's sysroot = {}", csysroot.display());
-    debug2!("sysroot_to_use = {}", sysroot_to_use.display());
+    debug!("compile_input's sysroot = {}", csysroot.display());
+    debug!("sysroot_to_use = {}", sysroot_to_use.display());
 
     let output_type = match context.compile_upto() {
         Assemble => link::output_type_assembly,
@@ -270,7 +270,7 @@ pub fn compile_input(context: &BuildContext,
 
     find_and_install_dependencies(context, pkg_id, in_file, sess, exec, &crate, deps,
                                   |p| {
-                                      debug2!("a dependency: {}", p.display());
+                                      debug!("a dependency: {}", p.display());
                                       // Pass the directory containing a dependency
                                       // as an additional lib search path
                                       if !addl_lib_search_paths.contains(&p) {
@@ -287,7 +287,7 @@ pub fn compile_input(context: &BuildContext,
             Bench => format!("{}bench", pkg_id.short_name).to_managed(),
             _     => pkg_id.short_name.to_managed()
         };
-        debug2!("Injecting link name: {}", name_to_use);
+        debug!("Injecting link name: {}", name_to_use);
         // FIXME (#9639): This needs to handle non-utf8 paths
         let link_options =
             ~[attr::mk_name_value_item_str(@"name", name_to_use),
@@ -295,11 +295,11 @@ pub fn compile_input(context: &BuildContext,
             ~[attr::mk_name_value_item_str(@"package_id",
                                            pkg_id.path.as_str().unwrap().to_managed())];
 
-        debug2!("link options: {:?}", link_options);
+        debug!("link options: {:?}", link_options);
         crate.attrs = ~[attr::mk_attr(attr::mk_list_item(@"link", link_options))];
     }
 
-    debug2!("calling compile_crate_from_input, workspace = {},
+    debug!("calling compile_crate_from_input, workspace = {},
            building_library = {:?}", out_dir.display(), sess.building_library);
     let result = compile_crate_from_input(in_file,
                                           exec,
@@ -315,9 +315,9 @@ pub fn compile_input(context: &BuildContext,
         result
     };
     for p in discovered_output.iter() {
-        debug2!("About to discover output {}", p.display());
+        debug!("About to discover output {}", p.display());
         if os::path_exists(p) {
-            debug2!("4. discovering output {}", p.display());
+            debug!("4. discovering output {}", p.display());
             // FIXME (#9639): This needs to handle non-utf8 paths
             exec.discover_output("binary", p.as_str().unwrap(), digest_only_date(p));
         }
@@ -342,22 +342,22 @@ pub fn compile_crate_from_input(input: &Path,
 // Returns None if one of the flags that suppresses compilation output was
 // given
                                 crate: ast::Crate) -> Option<Path> {
-    debug2!("Calling build_output_filenames with {}, building library? {:?}",
+    debug!("Calling build_output_filenames with {}, building library? {:?}",
            out_dir.display(), sess.building_library);
 
     // bad copy
-    debug2!("out_dir = {}", out_dir.display());
+    debug!("out_dir = {}", out_dir.display());
     let outputs = driver::build_output_filenames(&driver::file_input(input.clone()),
                                                  &Some(out_dir.clone()), &None,
                                                  crate.attrs, sess);
 
-    debug2!("Outputs are out_filename: {} and obj_filename: {} and output type = {:?}",
+    debug!("Outputs are out_filename: {} and obj_filename: {} and output type = {:?}",
            outputs.out_filename.display(),
            outputs.obj_filename.display(),
            sess.opts.output_type);
-    debug2!("additional libraries:");
+    debug!("additional libraries:");
     for lib in sess.opts.addl_lib_search_paths.iter() {
-        debug2!("an additional library: {}", lib.display());
+        debug!("an additional library: {}", lib.display());
     }
     let analysis = driver::phase_3_run_analysis_passes(sess, &crate);
     if driver::stop_after_phase_3(sess) { return None; }
@@ -375,7 +375,7 @@ pub fn compile_crate_from_input(input: &Path,
     // FIXME (#9639): This needs to handle non-utf8 paths
     exec.discover_input("file", input.as_str().unwrap(), digest_file_with_date(input));
 
-    debug2!("Built {}, date = {:?}", outputs.out_filename.display(),
+    debug!("Built {}, date = {:?}", outputs.out_filename.display(),
            datestamp(&outputs.out_filename));
 
     Some(outputs.out_filename)
@@ -401,10 +401,10 @@ pub fn compile_crate(ctxt: &BuildContext,
                      cfgs: &[~str],
                      opt: bool,
                      what: OutputType) -> Option<Path> {
-    debug2!("compile_crate: crate={}, workspace={}", crate.display(), workspace.display());
-    debug2!("compile_crate: short_name = {}, flags =...", pkg_id.to_str());
+    debug!("compile_crate: crate={}, workspace={}", crate.display(), workspace.display());
+    debug!("compile_crate: short_name = {}, flags =...", pkg_id.to_str());
     for fl in flags.iter() {
-        debug2!("+++ {}", *fl);
+        debug!("+++ {}", *fl);
     }
     compile_input(ctxt, exec, pkg_id, crate, workspace, deps, flags, cfgs, opt, what)
 }
@@ -429,11 +429,11 @@ impl<'self> Visitor<()> for ViewItemVisitor<'self> {
                     Some((p, _)) => p,
                     None => self.sess.str_of(lib_ident)
                 };
-                debug2!("Finding and installing... {}", lib_name);
+                debug!("Finding and installing... {}", lib_name);
                 // Check standard Rust library path first
                 match system_library(&self.context.sysroot(), lib_name) {
                     Some(ref installed_path) => {
-                        debug2!("It exists: {}", installed_path.display());
+                        debug!("It exists: {}", installed_path.display());
                         // Say that [path for c] has a discovered dependency on
                         // installed_path
                         // For binary files, we only hash the datestamp, not the contents.
@@ -449,7 +449,7 @@ impl<'self> Visitor<()> for ViewItemVisitor<'self> {
                     }
                     None => {
                         // FIXME #8711: need to parse version out of path_opt
-                        debug2!("Trying to install library {}, rebuilding it",
+                        debug!("Trying to install library {}, rebuilding it",
                                lib_name.to_str());
                         // Try to install it
                         let pkg_id = PkgId::new(lib_name);
@@ -479,15 +479,15 @@ impl<'self> Visitor<()> for ViewItemVisitor<'self> {
                                                   pkg_id.clone());
                         let (outputs_disc, inputs_disc) =
                             self.context.install(pkg_src, &JustOne(Path::new(lib_crate_filename)));
-                        debug2!("Installed {}, returned {:?} dependencies and \
+                        debug!("Installed {}, returned {:?} dependencies and \
                                {:?} transitive dependencies",
                                lib_name, outputs_disc.len(), inputs_disc.len());
-                        debug2!("discovered outputs = {:?} discovered_inputs = {:?}",
+                        debug!("discovered outputs = {:?} discovered_inputs = {:?}",
                                outputs_disc, inputs_disc);
                         // It must have installed *something*...
                         assert!(!outputs_disc.is_empty());
                         for dep in outputs_disc.iter() {
-                            debug2!("Discovering a binary input: {}", dep.display());
+                            debug!("Discovering a binary input: {}", dep.display());
                             // FIXME (#9639): This needs to handle non-utf8 paths
                             self.exec.discover_input("binary",
                                                      dep.as_str().unwrap(),
@@ -498,10 +498,10 @@ impl<'self> Visitor<()> for ViewItemVisitor<'self> {
 
                             // Also, add an additional search path
                             let dep_dir = dep.dir_path();
-                            debug2!("Installed {} into {}", dep.display(), dep_dir.display());
+                            debug!("Installed {} into {}", dep.display(), dep_dir.display());
                             (self.save)(dep_dir);
                         }
-                        debug2!("Installed {}, returned {} dependencies and \
+                        debug!("Installed {}, returned {} dependencies and \
                                 {} transitive dependencies",
                                 lib_name, outputs_disc.len(), inputs_disc.len());
                         // It must have installed *something*...
@@ -526,10 +526,10 @@ impl<'self> Visitor<()> for ViewItemVisitor<'self> {
                                                          digest_only_date(
                                                              &Path::new(dep.as_slice())));
                             } else {
-                                fail2!("Bad kind: {}", *what);
+                                fail!("Bad kind: {}", *what);
                             }
                             // Also, add an additional search path
-                            debug2!("Installed {} into {}",
+                            debug!("Installed {} into {}",
                                     lib_name, target_workspace.as_str().unwrap().to_owned());
                             (self.save)(target_workspace.clone());
                         }
@@ -554,7 +554,7 @@ pub fn find_and_install_dependencies(context: &BuildContext,
                                      c: &ast::Crate,
                                      deps: &mut DepMap,
                                      save: &fn(Path)) {
-    debug2!("In find_and_install_dependencies...");
+    debug!("In find_and_install_dependencies...");
     let mut visitor = ViewItemVisitor {
         context: context,
         parent: parent,
@@ -608,9 +608,9 @@ fn debug_flags() -> ~[~str] { ~[] }
 
 /// Returns the last-modified date as an Option
 pub fn datestamp(p: &Path) -> Option<libc::time_t> {
-    debug2!("Scrutinizing datestamp for {} - does it exist? {:?}", p.display(), os::path_exists(p));
+    debug!("Scrutinizing datestamp for {} - does it exist? {:?}", p.display(), os::path_exists(p));
     let out = p.stat().map(|stat| stat.st_mtime);
-    debug2!("Date = {:?}", out);
+    debug!("Date = {:?}", out);
     out.map(|t| { t as libc::time_t })
 }
 
diff --git a/src/librustpkg/version.rs b/src/librustpkg/version.rs
index 218f410e4dc..6ca19562724 100644
--- a/src/librustpkg/version.rs
+++ b/src/librustpkg/version.rs
@@ -107,7 +107,7 @@ pub fn try_getting_local_version(local_path: &Path) -> Option<Version> {
         let outp = run::process_output("git",
                                    ["--git-dir=" + git_dir.as_str().unwrap(), ~"tag", ~"-l"]);
 
-        debug2!("git --git-dir={} tag -l ~~~> {:?}", git_dir.display(), outp.status);
+        debug!("git --git-dir={} tag -l ~~~> {:?}", git_dir.display(), outp.status);
 
         if outp.status != 0 {
             continue;
@@ -136,7 +136,7 @@ pub fn try_getting_version(remote_path: &Path) -> Option<Version> {
         let tmp_dir = TempDir::new("test");
         let tmp_dir = tmp_dir.expect("try_getting_version: couldn't create temp dir");
         let tmp_dir = tmp_dir.path();
-        debug2!("(to get version) executing \\{git clone https://{} {}\\}",
+        debug!("(to get version) executing \\{git clone https://{} {}\\}",
                remote_path.display(),
                tmp_dir.display());
         // FIXME (#9639): This needs to handle non-utf8 paths
@@ -144,21 +144,21 @@ pub fn try_getting_version(remote_path: &Path) -> Option<Version> {
                                                                   remote_path.as_str().unwrap()),
                                                 tmp_dir.as_str().unwrap().to_owned()]);
         if outp.status == 0 {
-            debug2!("Cloned it... ( {}, {} )",
+            debug!("Cloned it... ( {}, {} )",
                    str::from_utf8(outp.output),
                    str::from_utf8(outp.error));
             let mut output = None;
             let git_dir = tmp_dir.join(".git");
-            debug2!("(getting version, now getting tags) executing \\{git --git-dir={} tag -l\\}",
+            debug!("(getting version, now getting tags) executing \\{git --git-dir={} tag -l\\}",
                    git_dir.display());
             // FIXME (#9639): This needs to handle non-utf8 paths
             let outp = run::process_output("git",
                                            ["--git-dir=" + git_dir.as_str().unwrap(),
                                             ~"tag", ~"-l"]);
             let output_text = str::from_utf8(outp.output);
-            debug2!("Full output: ( {} ) [{:?}]", output_text, outp.status);
+            debug!("Full output: ( {} ) [{:?}]", output_text, outp.status);
             for l in output_text.line_iter() {
-                debug2!("A line of output: {}", l);
+                debug!("A line of output: {}", l);
                 if !l.is_whitespace() {
                     output = Some(l);
                 }
@@ -185,7 +185,7 @@ enum ParseState {
 
 pub fn try_parsing_version(s: &str) -> Option<Version> {
     let s = s.trim();
-    debug2!("Attempting to parse: {}", s);
+    debug!("Attempting to parse: {}", s);
     let mut parse_state = Start;
     for c in s.iter() {
         if char::is_digit(c) {
@@ -248,7 +248,7 @@ fn test_parse_version() {
 #[test]
 fn test_split_version() {
     let s = "a/b/c#0.1";
-    debug2!("== {:?} ==", split_version(s));
+    debug!("== {:?} ==", split_version(s));
     assert!(split_version(s) == Some((s.slice(0, 5), ExactRevision(~"0.1"))));
     assert!(split_version("a/b/c") == None);
     let s = "a#1.2";
diff --git a/src/librustpkg/workcache_support.rs b/src/librustpkg/workcache_support.rs
index 34404ad625c..0352067a7e9 100644
--- a/src/librustpkg/workcache_support.rs
+++ b/src/librustpkg/workcache_support.rs
@@ -54,9 +54,9 @@ pub fn digest_only_date(path: &Path) -> ~str {
 
 /// Adds multiple discovered outputs
 pub fn discover_outputs(e: &mut workcache::Exec, outputs: ~[Path]) {
-    debug2!("Discovering {:?} outputs", outputs.len());
+    debug!("Discovering {:?} outputs", outputs.len());
     for p in outputs.iter() {
-        debug2!("Discovering output! {}", p.display());
+        debug!("Discovering output! {}", p.display());
         // For now, assume that all discovered outputs are binaries
         // FIXME (#9639): This needs to handle non-utf8 paths
         e.discover_output("binary", p.as_str().unwrap(), digest_only_date(p));
diff --git a/src/librustpkg/workspace.rs b/src/librustpkg/workspace.rs
index 13d70f15332..a3550037246 100644
--- a/src/librustpkg/workspace.rs
+++ b/src/librustpkg/workspace.rs
@@ -24,7 +24,7 @@ pub fn each_pkg_parent_workspace(cx: &Context, pkgid: &PkgId, action: &fn(&Path)
     let workspaces = pkg_parent_workspaces(cx, pkgid);
     if workspaces.is_empty() {
         // tjc: make this a condition
-        fail2!("Package {} not found in any of \
+        fail!("Package {} not found in any of \
                     the following workspaces: {}",
                    pkgid.path.display(),
                    rust_path().map(|p| p.display().to_str()).to_str());