Closed sc1478 closed 8 years ago
Never mind. Stupid programmer problem. My plugin that wraps nebula's was using a default script that did an rm -rf. I had copied it from a spec file, thinking that it made a good default, and then forgot about it.
anyone ever finding such an issue: look at your scripts. rpm -qp --scripts your.rpm
.
I am trying to build rpms using the Nebula rpm plugin for Gradle, which, of course, is based on Redline.
What I find is that when an rpm is built with rpmbuild and spec files (the traditional way), and a directory is created with
%dir
, any files subsequently written to that directory prevent its deletion byrpm -e
. This is default behavior of rpm and desirable. Imagine an rpm creating alogs
directory somewhere to which the installed application writes log files. We want to preserve those logfiles, even in an rpm uninstall (especially sincerpm -U
(upgrade) does an uninstall followed by an install).However in an rpm built by the Gradle plugin, I find that on uninstallation (
rpm -e
) I find that any log files that have been written to this directory after installation are blown away along with the directory. Even more bizarrely, this happens in spite of the debug output ofrpm -e
saying that it can't delete the directory because it isn't empty:It seems clear that rpmbuild is doing something that redline, or at least the Gradle plugin isn't. However, I'm unable to discern after reading rpm documentation, etc. what that might be. Can you tell me? I notice that your Builder.addDirectory() methods allow a Directive to be specified, but after looking at these Directives, nothing jumps out at me as being relevant to this situation, and in any case, in the spec file versions of my test, we are just providing a
%dir
without any other fancy directives. In any event, the Gradle plugin simply passes null for the Directive when it calls Redline.I have also posted this issue on the os-nebula project, Stack Overflow, and SuperUser. Hopefully someone can explain this frustrating situation.