Implement pkg_directory and common code
Implement pkg_directory and common code

Additional common code for pkg_runfiles and
pkg_library.

RELNOTES:none
PiperOrigin-RevId: 390596976

ButterflyNetwork/bazel,cushon/bazel,perezd/bazel,ButterflyNetwork/bazel,cushon/bazel,bazelbuild/bazel,cushon/bazel,katre/bazel,perezd/bazel,katre/bazel,ButterflyNetwork/bazel,perezd/bazel,ButterflyNetwork/bazel,ButterflyNetwork/bazel,perezd/bazel,cushon/bazel,perezd/bazel,katre/bazel,bazelbuild/bazel,katre/bazel,ButterflyNetwork/bazel,bazelbuild/bazel,bazelbuild/bazel,katre/bazel,katre/bazel,perezd/bazel,bazelbuild/bazel,cushon/bazel,perezd/bazel,bazelbuild/bazel,cushon/bazel