Mailinglist Archive: opensuse-packaging (116 mails)

< Previous Next >
Re: [opensuse-packaging] Re: Re: Howto protect files from removing after uninstall of a rpm?
В Wed, 1 May 2013 18:13:49 +0200 (CEST)
Yamaban <foerster@xxxxxxxx> пишет:

On Wed, 1 May 2013 17:27, Andrey Borzenkov <arvidjaar@...> wrote:

В Tue, 30 Apr 2013 13:45:51 +0200 (CEST)
Yamaban <foerster@xxxxxxxx> пишет:

On Tue, 30 Apr 2013 13:05, Meike Stone <meike.stone@...> wrote:
2013/4/26 Meike Stone <meike.stone@xxxxxxxxxxxxxx>:
Hello,

I try to build a RPM. All is working fine. But I need that after
uninstall of the rpm two files always should be left on disk. If the
package is updated, file should be replaced with the file from new
rpm and replaced renamed as .rpmsave.

Is there a way to do this in the spec file?

In general: define the file as %config(noreplace)

Was not the question how to *replace* files during installation?

Please look up what EXACTLY the added noreplace does.


What makes you believe I do not know it?

in short: if file changed during prior install
(e.g. changed file / filemode / timestamp) (see rpm --verify)
the file is moved to {filename}.rpmsave, and the new file from
the package is put into place.


that's what %config (without noreplace) does. The only caveat is - RPM
does not create .rpmsave if file was not changed in package (unless it
changed recently). It may or may not be what is required.

Trouble comes in the form of "location not allowed to be used as %config"
or similar due to added rpmlint / rpm-macros in the Distro.
"nacked" rpm does not imply such rules, the added Distro definitions do
that.

And yes, I already fell afoul this trouble.
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups