Solved 'missing or size mismatch' when pkg tracking latest

Version and Architecture: 14.1-RELEASE amd64

Note: For both pkg and ports, I am currently using a third-party mirror - one that's neither listed in the FreeBSD handbook, nor hosted under any FreeBSD domain. The specific mirror I am on is located at https://mirrors.ustc.edu.cn. This choice is made for sake of better and more stable access to the repos from my region.

Situation: In order to make life with both pkg and ports easier and 'stay on the cutting edge' to an extent, I chose to make pkg track the latest branch of the pkg repository. However, in subsequent use, I have more than once encountered missing or size mismatch errors. pkg would retry to download the same 'bad' file over and over again before eventually failing entirely. pkg update -f does not fix this.
Not ALL packages are made subject to this situation — mostly, I notice this phenomenon to be more common among packages that 'are most likely to be installed explicitly by users', such as libreoffice.

I looked up on the net and was able to work around the issue by having pkg track quarterly instead, but I do not like this workaround.
What else can I do to resolve this issue, or is it generally expected when your pkg tracks latest?
 
For both pkg and ports, I am currently using a third-party mirror - one that's neither listed in the FreeBSD handbook, nor hosted under any FreeBSD domain.
Then it's not supported. Any issues with those packages are beyond our scope.
 
Verified that this no longer reproduces when tracking the latest branch on https://pkg.FreeBSD.org. Marking as Solved.

Though I am personally curious as to what could have caused this to happen; after all, mirrors are supposed to be exact copies of the origin repos.
 
Back
Top