[Exherbo-dev] I hate CONFIG_PROTECT...

Ciaran McCreesh ciaran.mccreesh at googlemail.com
Fri May 23 10:47:16 BST 2008


...so how's about we make something better?

Functionality I'd like to see:

* Ability to say "give me a clean config set" without having to
reinstall the package, via paludis --fresh-confs target.

* Ability for packages to handle 'smart' config updates (e.g. if the
package knows you have to change buildroot to builddir).

* Ability for packages to say "it's ok to overwrite this config file
with our new version automatically if the user hasn't modified it"

We'd probably need:

* Somewhere for packages to install a 'clean' config set. Probably a
subdir under the VDB or Exndbam entry.

* Ability for packages to know whether config files were modified.

I'm thinking very roughly along these lines:

* The package manager merges, say, /etc to exndbamid/configs/etc
instead of /etc

* After the merge, if it's a clean install, call pkg_merge_confs with
'-' as $1.

* If it's a version change or reinstall, call pkg_merge_confs with the
old $PV as $1.

* default_pkg_merge_confs copies from SAVEDCONFSDIR to ROOT, using
protection for any overwrites. The DEFAULT_PKG_MERGE_CONFS vars
_REPLACE_IF_UNMODIFIED, _ALWAYS_REPLACE and _NEVER_REPLACE override
this. Or maybe it merges to SAVEDCONFS{PROTECT,REPLACE,DISCARD}DIR,
and the merger does the protection as a second step (DISCARD is purely
visual).

* On uninstall, call pkg_confs_remove.

Or something else entirely.

-- 
Ciaran McCreesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.exherbo.org/pipermail/exherbo-dev/attachments/20080523/b928ccd5/attachment.pgp 


More information about the Exherbo-dev mailing list