Automated g4 rollback of commit c4134802dd15d6ef5cca6521f6bf6aac395ee2ad.

*** Reason for rollback ***

Roll forward of directory name change

*** Original change description ***

Automated g4 rollback of commit 1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b.

*** Reason for rollback ***

Breaks //src/test/shell/integration:force_delete_output_test

*** Original change description ***

Symlink output directories to the correct directory name

If the workspace directory is /path/to/my/proj and the name in the WORKSPACE
file is "floop", this will symlink the output directories to
output_base/execroot/floop instead of output_base/execroot/proj.

More prep for #1262, fixes #1681.

PiperOrigin-RevId: 156892980
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
index f1e1db2..5989b62 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -257,7 +257,7 @@
    * Returns the workspace name for the rule.
    */
   public String getWorkspaceName() {
-    return rule.getPackage().getWorkspaceName();
+    return rule.getRepository().strippedName();
   }
 
   /**