Re: Removing directories/files in RPM erase
Tim Mooney <[email protected]> Thu, 22 May 2008 00:08:27 -0500 (CDT)
| Newsgroups | gmane.linux.redhat.rpm.general |
|---|---|
| Message-ID | <[email protected]> |
In regard to: Re: Removing directories/files in RPM erase, Jeff Johnson...: >>> However, when I remove the RPM, it doesn't remove the directories because >>> they aren't empty. Should I setup a post uninstall to see if this is the >>> last instance of the package and if it is, manually remove those >>> directories? >> >> Look up the %ghost attribute (?, token?, I'm not sure what it should be >> classified as) and see if that does what you need. >> > > %ghost won't solve removing nonempty directories. The %ghost directive, > with its mysterious name, claims ownership for a package of a pre-existing > path. No, but if the %ghost is applied to the log files and the other files that are created as part of the execution of the programs, then those will be removed when the package is removed, and hence the directory will be empty. > Establishing ownership of a directory in packaging, particularly for some > public path in which, say, modules > are installed, can be quite complicated. :-) Don't I know it! I started a pretty lengthy thread about that exact issue right after 4.4.7 or 4.4.8 came out and I first experienced needing to claim directories (which I also think is The Right Thing, it's just hard to do in some cases because of ambiguous ownership). Tim -- Tim Mooney [email protected] Information Technology Services (701) 231-1076 (Voice) Room 242-J6, IACC Building (701) 231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164