mirror of
https://github.com/OpenIndiana/pkg5.git
synced 2026-10-17 15:46:45 +00:00
Image Packaging System package manager
- Python 87.8%
- Roff 8.4%
- C 1.6%
- Shell 1.2%
- Mako 0.4%
- Other 0.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
pkg.catalog.Catalog.get_matching_fmris() documents that it returns
'references' as a dict mapping each matching FMRI to the list of
patterns that matched it:
{
fmri1: [pat1, pat2, ...],
...
}
It actually mapped each FMRI to a single bare pattern string, because
the dict comprehension building it used (f, p) rather than accumulating
per FMRI.
pkg.server.repository.Repository.get_matching_fmris() aggregates the
results of every repository store and merges them with dest[k].extend(v),
relying on the documented contract. As soon as the same FMRI is returned
by two stores, that merge fails:
# pkgrepo -s /path/to/repo remove consolidation/userland/userland-incorporation
Traceback (most recent call last):
...
File ".../pkg/server/repository.py", line 3598, in get_matching_fmris
merge(mrefs, references)
File ".../pkg/server/repository.py", line 3578, in merge
dest[k].extend(v)
AttributeError: 'str' object has no attribute 'extend'
This is reachable on any repository where a publisher's catalog holds
entries belonging to another publisher -- for instance after a rebuild
has indexed manifests that ended up below the wrong publisher directory,
since rebuild takes the publisher from the manifest's own pkg.fmri and
not from the directory name. Once in that state, pkgrepo remove cannot
be used on the repository at all unless -p is given to restrict the
operation to a single store.
Building references as documented also fixes a second, silent defect:
when one FMRI was matched by several patterns, all but the last were
discarded.
The only consumer that read these values as strings is pull.py, which is
updated to flatten them. pkgrepo(1) discards the references returned by
remove, and pkgsurf/sign never use them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
| doc | ||
| exception_lists | ||
| src | ||
| .gitignore | ||
| LICENSE-CDDL | ||
| LICENSE-CPIO | ||
| LICENSE-MINISAT | ||