On 19 November 2011 12:27, Dmitriy Sintsov <[email protected]> wrote:

> On 19.11.2011 2:15, Olivier Beaton wrote:
> > Debian already solves this through a rename hack.  For example the
> default
> > virtualhost is named 000-default   so that it gets loaded first.
> >   Similarly, I've had to rename module links so they are loaded before
> > others (dav before svn).  It's fairly straight forward and once you have
> a
> > lot of modules or vhosts, you'd curse every time you opened a 5,000+ line
> > conf file.
> >
> >
> I don't think that is a good solution. Because inserting / moving a
> vhost in-between requires a rename chain and multiple filename renames
> probably are not atomic. Can one make multiple renames in one kind of
> transaction (locking the dir, multirename, unlocking)? I don't have any
> troubles opening single 350 line conf file in vim (with syntax
> highlighting) and after copy / cut / paste, storing the "monolithic"
> vhosts.conf file is atomic (like transaction).
> Dmitriy
>

No, you can always create a new filename that will sort between two others
without needing to rename either of the other two.  And you can always
change *a* filename without altering the sort order of the collection.  So
if you have a "000-default" file and then a set of "100-foo" files that
must load after default (but it doesn't matter how they load amongst
themselves), then another set of "200-foo" files that must load after the
100- files, you can always choose a name ("050-", "100-", "150-", "200-" or
"250-") that will cause it to load at the time you need, without having to
rename any other files.

--HM
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to