resurrecting forgets POST_REBUILD (files)

sofar sofar at foo-projects.org
Tue Mar 7 02:44:35 UTC 2006



On Mon,  6 Mar 2006 20:05:48 +0100, "Remco Lubbers" <remco at web-adept.nl> wrote:
> L.S.,
> 
> Having created a few modules the past few days, using
> http://wiki.lunar-linux.org/index.php/Module_Basics as Holy Word, I
> noticed that installing a module through lin, removing it through lrm
> an reinstalling it by 'lin <module>', which resurrects the removed
> module if nothing changes (new version, remove sources etc), "forgets"
> to install the configuration files which are installed by POST_BUILD,
> although the above mentioned link says <quote>POST_BUILD runs in place
> of the default_post_build routine which is used to install minor
> documentation and transfer/enable initialization scripts and similar
> system data, mostly into /etc</quote>.


yes, I just fixed that (the wiki - it was wrong). You should NOT use the POST_BUILD file - it's only to provide some override capabilities for older modules and -profile stuff, really icky

> An Example is the linux_logo module I just submitted. In order to get
> /etc/linux_logo.conf and/or /etc/profile.d/linux_logo.rc back, you'll
> have to at leat 'lin -c linux_logo', it that expected behaviour?

the profile.d code should be handled by resurrect, if not then file a bug. I assume that the module has a 'profile.d' subdir with the xxx.rc in it?

installing config files should be done in the BUILD as follows:

(

  default_build &&
  if [ ! -e /etc/config.file ]; then
    install config.file /etc/
  fi

,,, for all config files. This will enable resurrect AND upgrades to install the (updated) configfiles (over the unchanged original).

anything else that impossibly can't go in BUILD must go into POST_INSTALL. Optimally, POST_INSTALL should NEVER install any files. (RFC language here: should means 'must')

Auke






More information about the Lunar-dev mailing list