I don't know why, but uninstallation of all my packages deletes all files but leaves a folders of the packages. I can't understand why... In debian packages it was easy - deleted all what was installed.
Here is a example of my .spec file. It's a simple package with only 3 files: .desktop, .png and aliendalvik-restart that located in /usr/share/jolla-adrestart folder. Only this folder leaves after uninstallation.
(I know, I know the "jolla-" prefix is for jolla apps, it's just example of my first package)
This will allow the programmer to distinguish different attitudes of his scripts depending on the operation: install or upgrade.
For install scripts ( %post, %pre ) check if $1 is equal to "1" then it is a first time install, not an update.
For uninstall scripts ( %postun, %preun ) check if $1 is equal to "0", if yes then it is a full removal; if not it is either an upgrade or an install --force of the same package.
Code:
To test this argument, the following 'if' statement is used:
%postun
if [ $1 = 0 ]; then
// Do stuff specific to uninstalls
fi
if [ $1 = 1 ]; then
// Do stuff specific to upgrades
fi
In this way I can add rm -rf /usr/share/jolla-adrestart to this %postun section and it will work perfectly. But I still don't know if this correct way to do for removing packages...
Please any advice ?
Here is a example of my .spec file. It's a simple package with only 3 files: .desktop, .png and aliendalvik-restart that located in /usr/share/jolla-adrestart folder. Only this folder leaves after uninstallation.
(I know, I know the "jolla-" prefix is for jolla apps, it's just example of my first package)
We tried with Coderus to find the reason, but without success
I found one interesting explanation about postuninstall script (%postun): http://wiki.mandriva.com/en/Development/Howto/RPM
Please any advice ?
Lausanne & Lyon de descente...
----------------
Schturman's home page
Schturman's repo on openrepos
RPM packaging directly on your Jolla phone.
Root & User SSH access to Jolla via WinSCP.
Root and User SSH access to Jolla via Nautilus on Linux PC.
Last edited by Schturman; 2014-02-17 at 22:26.