From: Christoph P. <pos...@de...> - 2008-03-12 15:45:19
|
On Wednesday 12 March 2008 10:32, Shlomy Marom wrote: > Hi, > > I'm using the rpm (RPM version 3.0.5) toolbox on AIX 5.3. > > I have a problem that must be solved before releasing the package I'm > building. > > > The %files section contains some directories. > > After installation, a user can put some files in these directories. > > When he tries to uninstall the package (rpm -e my_pkg) he gets the > following warning for all the non-empty directories that were included > in the %files section: > > "cannot remove /bla/blabla/ - directory not empty" > > In Linux I didn't get this kind of warnings. > > Is there any way to specify the RPM to ignore (or not to display) such > warnings?! Shlomy, I am afraid, this "works as designed". There are not too many options with "rpm -e". I am not aware of any option that suppresses messages generated by AIX commands (such as rmdir). One way to solve the problem would be to set up a %preun section in your spec file. This %preun script would purge unwanted files from the install directory. Then the directory /bla/blabla/ is empty and the message goes away. Be careful, however, not to scratch too many files. You get new messages when RPM tries to uninstall files that are no longer there. The script could do an "ls -l" on a file that the user can never touch, and grep (or awk) for the owner of the file (say it is root). The you do something like "find /bla/blabla -type f ! -user root -exec rm -f {} \;". This should erase all files owned by some user other than the userid that did the install. Please refer to max-rpm and the man pages of find for any details. -- Mit freundlichen Gruessen/Best Regards Dr. Christoph Pospiech High Performance & Parallel Computing Advanced Computing Technology Center Phone +49-351-86269826, eMail: pos...@de... Mobile +49-171 765 5871 IBM Deutschland GmbH Vorsitzender des Aufsichtsrats: Hans Ulrich Maerki Geschäftsführung: Martin Jetter (Vorsitzender), Christian Diedrich, Michael Diemer, Thomas Fell, Christoph Grandpierre, Matthias Hartmann Sitz der Gesellschaft: Stuttgart Registergericht: Amtsgericht Stuttgart, HRB 14562 WEEE-Reg.-Nr. DE 99369940 |