Use targets' labels' package identifier for query output=package

Subinclude targets' packages are the package containing the load
statement. Subinclude targets' labels are the bzl files they refer to.
The latter has the appropriate package to display for --output=package.

Fixes #3122.

PiperOrigin-RevId: 159750840
diff --git a/site/docs/query.html b/site/docs/query.html
index 5eb8885..86b4318 100644
--- a/site/docs/query.html
+++ b/site/docs/query.html
@@ -1225,6 +1225,11 @@
 </p>
 
 <p>
+  Packages in external repositories are formatted as
+  <code>@repo//foo/bar</code> while packages in the main repository are
+  formatted as <code>foo/bar</code>.
+</p>
+<p>
   In conjunction with the <code>deps(...)</code> query, this output
   option can be used to find the set of packages that must be checked
   out in order to build a given set of targets.