Mailinglist Archive: opensuse-packaging (116 mails)

< Previous Next >
Re: [opensuse-packaging] Re: Re: Howto protect files from removing after uninstall of a rpm?

Hello,

On May 1 20:27 Andrey Borzenkov wrote (excerpt):
2013/4/26 Meike Stone <meike.stone@xxxxxxxxxxxxxx>:
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.
...
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.

See
http://www-uxsup.csx.cam.ac.uk/~jw35/docs/rpm_config.html
and
http://www.rpm.org/max-rpm/s1-rpm-erase-and-config-files.html

Therefore one has to enforce that the file on disk gets changed
e.g. by something appropriate in the RPM post install scriptlet.

But even then, "rpm -e" would not leave the file as is on disk
because it would be kept as file.rpmsave.

And I don't know what happens if "rpm -i / rpm -e" are run
multiple times like:

# rpm -i package.rpm (installs file and modifies it via %post)

# rpm -e package (keeps file as file.rpmsave)

# rpm -i package.rpm (installs file and modifies it via %post)

# rpm -e package (what exactly is now in file.rpmsave?)


Kind Regards
Johannes Meixner
--
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >