Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   RPM Package Manager (http://www.linux-archive.org/rpm-package-manager/)
-   -   handling removal of shared file (http://www.linux-archive.org/rpm-package-manager/126290-handling-removal-shared-file.html)

"Victoria Muntean" 07-17-2008 05:43 AM

handling removal of shared file
 
[cross post rpm-list@redhat.com, usenet group linux.redhat.rpm ]
*
I have 3 specfiles for 3 [somehow related] packages, A, B, C.
All 3 specfiles*include same configfile /etc/abc_common.cfg.
When I remove package C, rpm -e removes file /etc/abc_common.cfg,
even though A and B are still installed. This breaks packages A and B.


How to make rpm keep shared file until last package that uses it is
removed ?

Thanks
*
Viki

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list

devzero2000 07-21-2008 08:01 AM

handling removal of shared file
 
2008/7/17 Victoria Muntean <vikimun@gmail.com>:


[cross post rpm-list@redhat.com, usenet group linux.redhat.rpm ]
*
I have 3 specfiles for 3 [somehow related] packages, A, B, C.
All 3 specfiles*include same configfile /etc/abc_common.cfg.
When I remove package C, rpm -e removes file /etc/abc_common.cfg,
even though A and B are still installed. This breaks packages A and B.

I my humble opinion it is a bad RPM practice to have +1 package with the
same config file. In effect i am pretty sure you haven't marked them in the SPEC as %config,

because the RPM rule will not permit the installation of the second RPM. So the beaviour you describe
it is not due to RPM.

JMHO, YMMV

*

Viki


_______________________________________________

Rpm-list mailing list

Rpm-list@redhat.com

https://www.redhat.com/mailman/listinfo/rpm-list


_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list

Carter Sanders 07-21-2008 08:37 PM

handling removal of shared file
 
I also think you should not share the config file. You can look at
apache for an example related projects using a shared config directory,
but not the same file. Apache has a top level /etc/httpd.conf which
includes all the files under /etc/httpd/conf.d/. When you install
apache add ons, they drop files in /etc/httpd/conf.d/, which works
well. I can't remember which ones now, but I have seen a similar
practice in other packages as well.



I should warn you, that if you try to do anything tricky with having
various rpm postinstall* scripts do some manipulation of the shared
conf file, you may run into problems. I've worked somewhere where they
tried to make that work, and it didn't. The conf file can always change
enough that script regexps don't match it anymore. Also, it's difficult
to get the logic right in a postinstall script that manipulates a
config file with respect to proper handling up updates vs. installs.



-Carter



devzero2000 wrote:

2008/7/17 Victoria Muntean <vikimun@gmail.com>:




[cross post rpm-list@redhat.com,
usenet group linux.redhat.rpm ]
*
I have 3 specfiles for 3 [somehow
related] packages, A, B, C.
All 3 specfiles*include same
configfile /etc/abc_common.cfg.

When I remove package C, rpm -e removes file /etc/abc_common.cfg,

even though A and B are still installed. This breaks packages A and B.




I my humble opinion it is a bad RPM practice to have +1 package with
the

same config file. In effect i am pretty sure you haven't marked them in
the SPEC as %config,

because the RPM rule will not permit the installation of the second
RPM. So the beaviour you describe

it is not due to RPM.



JMHO, YMMV



*


Viki





_______________________________________________

Rpm-list mailing list

Rpm-list@redhat.com

https://www.redhat.com/mailman/listinfo/rpm-list








_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list






_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list


All times are GMT. The time now is 10:16 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.