Bug 215982

Summary: ports-mgmt/pkg: Cached packages reuse between different pkg repositories can cause failure
Product: Ports & Packages Reporter: Sylvain Garrigues <sylvain>
Component: Individual Port(s)Assignee: freebsd-pkg (Nobody) <pkg>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: pkg
Priority: --- Flags: vlad-fbsd: maintainer-feedback? (pkg)
Version: Latest   
Hardware: Any   
OS: Any   

Description Sylvain Garrigues 2017-01-11 23:26:34 UTC
I added a new pkg repository in addition to FreeBSD default one.

This repo contains some packages with different options than FreeBSD default ones, for instance llvm37.  

If I uninstall the llvm37 package, the actual dot pkg file may still exist in /var/cache/pkg, which will cause `pkg install llvm37' to fail the next time I try to install it if my repo has a higher priority: it fails with a size mismatch from cache error.

Shouldn't cache dir be different by repo to prevent these name clashes?
Comment 1 VK freebsd_triage 2017-01-12 16:53:37 UTC
Reassign to pkg@.
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2021-08-17 16:48:03 UTC
the cached files contains the hash in the name, so no collision possible