Shuffle around all the constants related to the name of the //external package and the prefix of external packages in the execroot.
This is in preparation for renaming that path segment from "external" to "bazel-external" so that we can provide a symlink to it from the source tree so that the source tree looks like the execroot.
--
MOS_MIGRATED_REVID=109882753
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java
index a9ad155..4dcd817 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Package.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java
@@ -61,16 +61,6 @@
*/
public class Package {
- public static PackageIdentifier EXTERNAL_PACKAGE_IDENTIFIER;
-
- static {
- try {
- Package.EXTERNAL_PACKAGE_IDENTIFIER = PackageIdentifier.parse("//external");
- } catch (LabelSyntaxException e) {
- throw new IllegalStateException();
- }
- }
-
/**
* Common superclass for all name-conflict exceptions.
*/
@@ -728,7 +718,7 @@
}
public static LegacyBuilder newExternalPackageBuilder(Path workspacePath, String runfilesPrefix) {
- LegacyBuilder b = new LegacyBuilder(EXTERNAL_PACKAGE_IDENTIFIER, runfilesPrefix);
+ LegacyBuilder b = new LegacyBuilder(Label.EXTERNAL_PACKAGE_IDENTIFIER, runfilesPrefix);
b.setFilename(workspacePath);
b.setMakeEnv(new MakeEnvironment.Builder());
return b;
@@ -811,7 +801,7 @@
/** Determine if we are in the WORKSPACE file or not */
public boolean isWorkspace() {
- return pkg.getPackageIdentifier().equals(EXTERNAL_PACKAGE_IDENTIFIER);
+ return pkg.getPackageIdentifier().equals(Label.EXTERNAL_PACKAGE_IDENTIFIER);
}
/**