Prevent removal of configured files after Portfile change
Emmanuel Hainry
ehainry at free.fr
Mon Jul 9 07:12:13 PDT 2007
On 09 Jul 2007, at 14:46, Simon Ruderich wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> Ryan Schmidt wrote:
>> I think you're saying that you have a port that installs a
>> configuration
>> file, and that you've then changed the configuration file, and
>> when you
>> upgrade the port, your changes to the configuration file are lost.
>> The
>> solution is for the port to install a *sample* configuration file,
>> and
>> for the user to manually copy the sample to the real configuration
>> file
>> name when configuring. See the apache2 portfile's
>> httpd.conf.sample for
>> an example.
>
> Thanks for your answer, but I meant something else.
> When I'm working on a new Portfile I often have to run for example the
> "port -d configure" command very often, because some libraries are not
> found and I have to experiment with the options (for configure).
> But every time I change the Portfile it removes the old extracted data
> and starts it all again. The same occurs with the "port -d build"
> command.
> So my question is how can I prevent the removal of the files which
> were
> extracted in the port's "work" directory.
>
When I have to tweak with the configure arguments or build
environment, I do that manually instead of relying on port: going
inside the build dir and trying configure, make, even make install
(with special prefix) in order to get a working process. Only after
that do I write the Portfile and try trace mode to check for
dependencies. There is no use in writing a portfile for something you
are not sure will compile... Unless if you are able to guess
everything in two tries and write patchfiles directly.
Emmanuel
More information about the macports-dev
mailing list