Reputation: 4070
I'm using maven to create an rpm that I can use to install my app.
In my of my mappings I specify a directory that contains files that are needed for the post-install step:
<mappings>
<mapping>
<directory>${rpm.info.install_dir}</directory>
<filemode>700</filemode>
<sources>
<source>
<location>src/main/resources/install</location>
</source>
</sources>
</mapping>
</mappings>
In my post-install step I use those files and in the end of the step I delete the directory. As a result, in the post-remove step I'm getting multiple errors that all the files in the directory ${rpm.info.install_dir}
don't exist:
Remove 1 Package
Installed size: 46 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : my-app-1.0.0-SNAPSHOT.noarch 1/1
warning: file /data/install/file1.conf: remove failed: No such file or directory
warning: file /data/install/file2.conf: remove failed: No such file or directory
warning: file /data/install/dir1/file1.service: remove failed: No such file or directory
I guess that rpm will try to remove all files mentioned in spec file (%files) in the post-remove step. Is there any way to avoid this action? I do want to remove the install directory after the post-install step and not wait with it until customer decides to delete the rpm.
Upvotes: 1
Views: 130