New --init option

Issue #377 on hold
Florian Schulze created an issue

Currently devpi-server will automatically create a new database if the --serverdir is empty. This has caused me some pain whenever I was testing stuff and got the directory wrong, or when deploying devpi with automation tools.

I propose a new --init option.

If it's used and the --serverdir is empty or doesn't exist, then the current behaviour is used and a new DB created. If it's used and the --serverdir is not empty, devpi-server will exit with error.

If it's omitted and the --serverdir is empty or doesn't exist, then devpi-server will exit with error. If it's omitted and the --serverdir exists, the current behaviour is used and the existing data is used.

I'm not sure whether we should increase the major version for this change. It's kind of a backwards incompatible change, but only for the first install. Existing installations will continue to work. Only the documentation has to be updated. No import/export is required.

Comments (3)

  1. Holger Krekel repo owner

    Fix issue377: Add new --init option required to initialize a server directory. This prevents accidental use of wrong or empty --serverdir.

    → <<cset 0085a93b96a5>>

  2. Log in to comment