The problem
Users start complaining so you go check that and see that your repo is half-dead, dist files became really small, for example: dists/buster/main/binary-amd64/Packages may become just a few kilobytes of size when it has to be much bigger in big repos. People stop seeing packages in the repo's "index", but deb files are there still.
reprepro check returns:
packages.db/stretch|main|armhf: BDB0088 DB_SECONDARY_BAD: Secondary index inconsistent with primary
Internal error of the underlying BerkeleyDB database:
Within packages.db subtable stretch|main|armhf at c_get(DB_NEXT): BDB0088 DB_SECONDARY_BAD: Secondary index inconsistent with primary
There have been errors!
The cause
When you update reprepro binary to a newer version and then execute includedeb after that - dist files start containing only what you have just added. After that you may run reprepro check and start seeing the error message above.
The thing is that originally there is no db/packagenames.db file and it is created on first run, but it's somehow already broken.
To avoid that issue
Hold your breath, don't add anything YET ... Once reprepro binary is updated simply do reprepro check. After that do whatever you want.
If already broken!
Don't worry, it seems that you don't have to have a backup this time!
To FIX everything, simply:
- remove broken
db/packagenames.db
- run
reprepro check to populate db/packagenames.db in a right way
- run
reprepro export to re-generate those almost-empty dist files so they are good and healthy and heavy.
- next time it's not gonna break, keep using reprepro.
The problem
Users start complaining so you go check that and see that your repo is half-dead, dist files became really small, for example:
dists/buster/main/binary-amd64/Packagesmay become just a few kilobytes of size when it has to be much bigger in big repos. People stop seeing packages in the repo's "index", but deb files are there still.reprepro checkreturns:The cause
When you update
repreprobinary to a newer version and then executeincludedebafter that - dist files start containing only what you have just added. After that you may runreprepro checkand start seeing the error message above.The thing is that originally there is no
db/packagenames.dbfile and it is created on first run, but it's somehow already broken.To avoid that issue
Hold your breath, don't add anything YET ... Once reprepro binary is updated simply do
reprepro check. After that do whatever you want.If already broken!
Don't worry, it seems that you don't have to have a backup this time!
To FIX everything, simply:
db/packagenames.dbreprepro checkto populatedb/packagenames.dbin a right wayreprepro exportto re-generate those almost-empty dist files so they are good and healthy and heavy.