rpm-maven-plugin - %config(noreplace) support
---------------------------------------------
Key: MOJO-1201
URL: http://jira.codehaus.org/browse/MOJO-1201
Project: Mojo
Issue Type: Wish
Components: rpm
Reporter: Logisch
Priority: Trivial
Currently it is only possible to write '%config' to the .spec file of an RPM by
using the rpm-maven-plugin.
This is performed by placing '<configuration>true</configuration>' in the
mapping section.
http://mojo.codehaus.org/rpm-maven-plugin/map-params.html#configuration
Some of us however require to use: %config(noreplace)
This option can be supported by simply changing the
org.codehaus.mojo.rpm.Mapping file.
One way of doing this for instance is replacing the 'private boolean
configuration' by 'private String configuration'.
And if the getAttrString() method than for instance contains:
{code:java}
if( configuration != null && configuration.trim().length() > 0 )
{
if ( configuration.equals("true") )
{
sb.append( "%config " );
}
else
{
sb.append( configuration + " " );
}
}
{code}
I would be able to write '<configuration>%config(noreplace)</configuration>' in
my mapping section, while maintaining backwards compatibility.
Or, probably more elegant, enable users to use:
'<configuration>noreplace</configuration>'
For those that are interested, the difference between %config and
%config(noreplace):
If an upgrade has a changed config file AND
if the config file was edited after installation
than during the upgrade:
- %config will save the edited file with the extension .rpmsave and use config
file from the RPM
- %config(noreplace) will leave edited config file but will save the config
file from the RPM as .rpmnew
so %config will replace the custom config file, whereas %config(noreplace)
won't replace it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email