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?
Hi, Dmitriy 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 %preinstall scriptlet would be better / cleaner: [code] #!/usr/bin/sh # Cleanup in /usr/share/%name BEFORE install / update # due to change from discrete files to zipped archive PATH=/usr/bin/:$PATH # no dir, nothing to do test -d /usr/share/%name || exit files=`rpm -ql %name|grep /usr/share/%name|tr ' ' '?'|sed 's,/usr/share/%name/,./,'` # no files, nothing to do test -z $files && exit # change into dir, just to make sure cd /usr/share/%name test -n $files && rm $files #EOF [/code] - Yamaban -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org