sow where
sow where answers “which repositories and Dists carry this package?” for the whole workspace. Use
it before you remove or replace a package that several repositories share, or to confirm that an
add landed where you expected. Unlike sow show, it searches every
repository by default and reports locations instead of the full package record.
Synopsis
| Flag | Meaning | Default |
|---|---|---|
-C, --workdir DIR |
Workspace discovery start directory | current directory |
-r, --repo NAME |
Search only this repository | all repositories |
-d, --dist NAME |
Search only these Dists; repeatable | all Dists |
--json |
Output JSON | false |
Output
The first line echoes the reference and the number of locations; each further line is one repository that contains the package:
dists lists the Dists of that repository that include the package in desired state; built_dists
lists those whose current build includes it.
With --json, the locations are in result.locations. The top-level repository field is the
repository named by -r, or null when the search spans the workspace. To list every
repository/dists pair in a script:
Reference resolution
PACKAGE uses the same grammar as sow show: SHA-256 identity, canonical
RPM/DEB coordinate, full filename, or bare name.
The reference must identify one package, meaning the same format, coordinate, and SHA-256. That one
package may sit in several repositories. If the name matches different packages, narrow the search
with -r or -d, or pass an exact coordinate or SHA-256.
where finds candidates through desired membership. A package removed from every selected Dist is
not found, even if an older build still lists it. To inspect such a stored package, run
sow show PACKAGE -r NAME without -d. A reference that matches nothing is rejected:
Exit codes
| Code | Trigger |
|---|---|
0 |
One package and its locations printed |
1 |
Runtime I/O failure |
2 |
Usage error or workspace not found |
5 |
A repository state database is unreadable or inconsistent |
6 |
Explicit repository or Dist is not configured, or the reference matched nothing or was ambiguous |
See also
sow show— inspect the resolved packagesow ls— list one Dist- Package References — exact grammar and ambiguity rules