Skip to content

Repo dies and DB files get corrupted when switching from 5.3.0 non-multi to multiple-versions-debian #16

@andywolk

Description

@andywolk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions