Opened 19 years ago
Closed 19 years ago
#1572 closed defect (fixed)
Trac-admin does not upgrade trac.ini file
Reported by: | Emmanuel Blot | Owned by: | daniel |
---|---|---|---|
Priority: | normal | Milestone: | 0.9 |
Component: | admin/console | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | ebcom@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
trac-admin
upgrades the SQLite database when upgrade is performed.
However, the trac.ini
sections are not updated with the new default values which may be very useful indeed.
trac.ini
is only created at environment creation time (initenv), but never gets updated with the new default values that comes with each new release of Trac.
Attachments (0)
Change History (4)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Yes, you're right.
However, the docs do not always reflect the current development (see the newly introduced "mainnav" and "metanav" keys for example), and I believe it is very hard to maintain the doc and the development code in sync.
Many options available in trac.ini remain unknown to the user who choses to upgrade, and I believe showing these configuration options in the trac.ini, even if they fully reflect the default hardcoded value in the python code, is a good idea.
I think it's better to know about the existence of an option through the trac.ini file, then have a look to know what this option is about, rather than to read extensively the documentation to see whether the trac.ini contains an newly introduced option or not.
There is another "pro" for updating trac.ini file: it allows the user who upgrades and the user who creates a new environment to have the same kind of trac.ini file.
I do not see many "cons" to updating the trac.ini file. Perhaps it would be better to have a distinct command in the trac-admin to select whether or not to upgrade the .ini file, rather than upgrading it along with the DB.
comment:3 by , 19 years ago
I was just about to submit a ticket about this, too. I think it's a great idea. As one who maintains several "devel" trac installations, it's nice to know that an option is available by just looking at the trac.ini file, rather than having to search through layers of commit logs and ticket comments for new features.
Since there are default values for trac.ini fields, it should be harmless to just insert them into trac.ini with no assigned value. I'm much more likely to notice a new command in trac.ini than I am to see it in the documentation that I read once before installing my first copy of trac and only use for specific keyword-searches afterward.
comment:4 by , 19 years ago
Milestone: | → 0.9 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Trac 0.9 does something like that by creating a trac.ini.sample
file in the $TRAC_ENV/conf
folder. That's the same file as the
default trac.ini
that would be created by an initenv
operation.
It's easy to pick new settings from that file and put them in the
existing trac.ini
file, without risking to overwrite customizations
to the file (like comments) like a rewrite would do.
I believe that in most cases there are also default values for the config in the code itself in case a property isn't set. Did you have specific settings in mind, or is this just a general suggestion? Generally I think it should be sufficient to provide docs about what new options are available, but Trac should be able to operate fine if they're not set (unlike the DB where the schema updates are required).