VectorLinux
July 28, 2014, 08:09:03 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Run command after uninstall app  (Read 1035 times)
hata_ph
Packager
Vectorian
****
Posts: 3256


-- Just being myself --


« on: February 25, 2011, 07:55:54 pm »

I am building an applications that will update the mime folder. It will screw up the mime type for my desktop after i install it. It can be solve by running
Quote
update-mime-database /usr/share/mime


I can modify the slackbuild to include below command inside the doinst.sh

Quote
if [ -x usr/bin/update-desktop-database -a -x usr/bin/chroot ]; then
  usr/bin/chroot /$ROOT /usr/bin/update-desktop-database &> /dev/null
fi

if [ -x usr/bin/update-mime-database -a -x usr/bin/chroot ]; then
  usr/bin/chroot /$ROOT /usr/bin/update-mime-database /usr/share/mime &> /dev/null
fi

but what if I uninstall the app and re-run the command again?
Logged
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #1 on: February 25, 2011, 08:29:51 pm »

what files are in the pkg/usr/share/mime/ dir?
Logged
hata_ph
Packager
Vectorian
****
Posts: 3256


-- Just being myself --


« Reply #2 on: February 25, 2011, 08:41:11 pm »

Quote
usr/share/mime/
usr/share/mime/application/
usr/share/mime/application/x-glabels.xml
usr/share/mime/aliases
usr/share/mime/packages/
usr/share/mime/packages/glabels.xml
usr/share/mime/icons
usr/share/mime/globs2
usr/share/mime/XMLnamespaces
usr/share/mime/subclasses
usr/share/mime/treemagic
usr/share/mime/types
usr/share/mime/globs
usr/share/mime/magic
usr/share/mime/mime.cache
usr/share/mime/generic-icons
usr/share/omf/
usr/share/omf/glabels/
usr/share/omf/glabels/glabels-de.omf
usr/share/omf/glabels/glabels-C.omf
usr/share/omf/glabels/glabels-es.omf
usr/share/omf/glabels/glabels-cs.omf
usr/share/omf/glabels/glabels-fr.omf
usr/share/mime-info/
usr/share/mime-info/glabels.keys
usr/share/mime-info/glabels.mime
Logged
hata_ph
Packager
Vectorian
****
Posts: 3256


-- Just being myself --


« Reply #3 on: February 28, 2011, 08:27:03 pm »

Anyone have any idea?
Cause when you remove some package it need to manually run update-mime-desktop /usr/share/mime to fix the mime setting...
Logged
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #4 on: February 28, 2011, 08:55:51 pm »

sorry I didnt get back to you sooner.
the package should not  have any files in the /usr/share/mime dir
running "rm $PKG/usr/share/mime/*" from the slackbuild should delete the files and leave the dirs that are needed for this pkg
Logged
hata_ph
Packager
Vectorian
****
Posts: 3256


-- Just being myself --


« Reply #5 on: February 28, 2011, 10:26:48 pm »

sorry I didnt get back to you sooner.
the package should not  have any files in the /usr/share/mime dir
running "rm $PKG/usr/share/mime/*" from the slackbuild should delete the files and leave the dirs that are needed for this pkg

Not quite clear what you are saying... Huh Huh Huh Huh
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!