Prevent removal of configured files after Portfile change
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi, is it possible to prevent the complete removal of all configured/compiled data if the Portfile was changed. I'm just updating configuration parameters but port completely removes the project data and starts again. Thanks for your help, Simon - -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFGkUCpYRX4BO+zMikRCmqJAKDB0nlMLlpEi3/PMkEx9nXShkrucgCgrcF7 N67UPiiRSCankBTt8s9i1t8= =SOD+ -----END PGP SIGNATURE-----
On Jul 8, 2007, at 14:53, Simon Ruderich wrote:
is it possible to prevent the complete removal of all configured/compiled data if the Portfile was changed. I'm just updating configuration parameters but port completely removes the project data and starts again.
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.
-----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. Thanks for your help, Simon - -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFGki4PYRX4BO+zMikRCtqDAJ9tbBHdfO/iA8Ypmux0YLTMF1RcwwCeNyZL C/CwFhXNUjiTJ/i7ivbuc1g= =+jqM -----END PGP SIGNATURE-----
Le 07-07-09 à 08:46, Simon Ruderich a écrit :
-----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.
you mean "port -o" (as seen in the manpage) yves
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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Yves de Champlain wrote:
you mean "port -o" (as seen in the manpage)
yves
That's working, thanks for your quick response. Stupid of me not trying it, but the manpage comment was a bit confusing to me. But I just should have tried it. Thanks for your help, Simon - -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFGkliBYRX4BO+zMikRCtm8AJ9B2VTOl/Z/n/eWk46iI9GgTbFlqQCfespz LVdN7C1RpsU6VSilo5wwBD0= =HWVA -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Emmanuel Hainry wrote:
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
I'm using this approach too, but after I got it working with configure, make, make install it sometimes doesn't work with macports instantly; there are still some additional information (for example to configure) necessary. And it speeds me up, when macports isn't removing the hole directory (but thanks to Yves I know now how to prevent this). Thanks for your help, Simon - -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFGkll8YRX4BO+zMikRCu6qAJ4jv66tV6sUo/3jBFYFhVtNUMnKqQCguF/D ZE4fiDx4XoPFfbJRzkPevIU= =HIE6 -----END PGP SIGNATURE-----
participants (4)
-
Emmanuel Hainry
-
Ryan Schmidt
-
Simon Ruderich
-
Yves de Champlain