Yamaban <foerster(a)lisas.de> Tue, 26 May 2015 22:23:03 +0300:
On Tue, 26 May 2015 21:10, Dmitriy Perlow
Hi to all.
I maintain monster-rpg-2 package at games repo. The game provided some
files at /usr/share/%name but now it should provide the single zip file
there. So I just updated the spec, rebuild packages and installed them.
For some reason /usr/share/%name' files weren't purged! So game tries
to load both files and zip file and fails.
Any tips please?
If you are sure that ALL files in /usr/share/%name are replaced, I'd use
a %preinstall scriptlet to remove the whole dir, just to be sure.
Necessary for this: your package "owns"
(brings) the /usr/share/%name
directory, and all the files in it.
Thinking more on it, maybe the following as
would be better / cleaner:
# Cleanup in /usr/share/%name BEFORE install / update
# due to change from discrete files to zipped archive
# no dir, nothing to do
test -d /usr/share/%name || exit
files=`rpm -ql %name|grep /usr/share/%name|tr ' ' '?'|sed
# no files, nothing to do
test -z $files && exit
# change into dir, just to make sure
test -n $files && rm $files
Seems to be nice but where may it be placed into the spec file?
Dmitriy DA(P).DarkneSS Perlow @ Linux x64
To unsubscribe, e-mail: opensuse-packaging+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-packaging+owner(a)opensuse.org