![]() |
How to prevent installation of RPM file ?
Hi
Someone know how to prevent installation of RPM file with the same files structure ? For example I have 3 hebrew vkb RPM files, all of them have the same structure: /usr/share/jolla-hebrewvkb/jolla/layouts /usr/share/jolla-hebrewvkb/font /usr/share/jolla-hebrewvkb/backup If one of packages already installed and I trying to install another one, it installed without any problem over the same files... How to prevent it ? I tried to add this lines to .spec file before packaging: Code:
%pre Code:
%pre Maybe I need to add something else ? Please, any advice ? |
Re: How to prevent installation of RPM file ?
@Schturman exit 1
|
Re: How to prevent installation of RPM file ?
hmm
maybe somthing like %pre %if [ -d /usr/share/jolla-hebrewvkb ] exit 0 %endif |
Re: How to prevent installation of RPM file ?
Thanks guys, I will try later and report..
|
Re: How to prevent installation of RPM file ?
Ok tested...
nieldk, you method not work at all.. coderus, You method work, but not so good... It's good, I can't install another vkb: Code:
Installing packages [=========================] Code:
pkcon install-local -y /home/nemo/Downloads/hebrewvkb-4ar-0.1-1.armv7hl.rpm Code:
pkcon remove hebrewvkb-4ar Code:
Downloading packages [=========================] :( |
Re: How to prevent installation of RPM file ?
Just use .spec file.
Obsoletes: - if you want to uninstall other versions Conflicts: - if you want to keep 1st installed rpm package and stop 2 other packages from installing (And you all 3 packages can use Provides: hebvbk for example so depending packages dont care which one of the 3 packages is installed). |
Re: How to prevent installation of RPM file ?
Quote:
Wanted to ask you about Provides: if I understand it right.. For example I have 3 packages named: hebrewvkb-4ar hebrewvkb-2ar-3lang hebrewvkb-2ar-2lang I'm going to create another/different app/package and I know it can be conflicted with this 3 packages. I will add: Provides: hebrewvkb to new package and that mean, when I will try to install new package and I already have one of 3 packages (vkb) installed - it just will not allow me to install new package ? I'm right ? |
Re: How to prevent installation of RPM file ?
Shouldn't the pkg mgr refuse to overwrite files, as dpkg does?
|
Re: How to prevent installation of RPM file ?
Hmmm, I have also another question, why when I try to update to new version of my app, the install command show me that all installed ok, but when I check /usr/share/ the folder of my package is not here. Looks like it just uninstalled my previous version but not installed new one and I need run install command again to get it.
Something missing my spec file ? EDIT: Nevermind, I found where is my problem, I added this line to spec file: Code:
%postun How I can completely remove package (include folder of my app) ? |
Re: How to prevent installation of RPM file ?
Is there something in /usr/share/jolla-adrestart that your application writes there in installation scripts or after installation during runtime? All files in that directory must be included into the rpm otherwise it will not remove it as there are files not belonging to the rpm package uninstalled.
|
All times are GMT. The time now is 07:30. |
vBulletin® Version 3.8.8