![](https://seccdn.libravatar.org/avatar/ba6138f793e72be6644854fdc3ec2f02.jpg?s=120&d=mm&r=g)
Hello, On May 1 20:27 Andrey Borzenkov wrote (excerpt):
2013/4/26 Meike Stone <meike.stone@googlemail.com>:
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@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org