LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Installing or uninstalling package breaks the system (https://www.linuxquestions.org/questions/slackware-14/installing-or-uninstalling-package-breaks-the-system-4175492390/)

Ilgar 01-24-2014 04:24 AM

Installing or uninstalling package breaks the system
 
Hi all,

I'm running Slackware64 14.1 on several computers and I observed this issue on each one of them: I have a .tgz package for TeXmacs, created using src2pkg. Whenever I install or uninstall this package (using installpkg or removepkg), my system breaks down. The icons of XFCE menus disappear, for example. The programs start misbehaving or not running at all. Although I wasn't able to reproduce it, once I even got "command not found" error for "ddate", for example. The logs in /var/log do not give any information. I can only fix the situation by going down to runlevel 1 and then up again (or, a restart of course).

By the way, I remember this sort of behaviour occurring in previous versions of Slackware, though I don't remember which packages were involved (I never had to time to investigate it carefully).

Here is the doinst.sh script of the package, which I believe is created automatically by src2pkg:

Code:

#!/bin/sh

# Figure out our root directory
ROOTDIR=$(pwd)
unset CHROOT
if [ "${ROOTDIR}" != "/" ] ; then
  ROOTDIR="${ROOTDIR}/"
  CHROOT="chroot ${ROOTDIR} "
fi

# update the applications menu database
if [ -x usr/bin/update-desktop-database ] ; then
 ${CHROOT} usr/bin/update-desktop-database -q usr/share/applications 2> /dev/null
fi


# update the gtk-icon-cache
if [ -x usr/bin/gtk-update-icon-cache ] ; then
  for dir in usr/share/icons/* ; do
    if [ -d $dir ]; then
      ${CHROOT} usr/bin/gtk-update-icon-cache --quiet -f -t $dir 2> /dev/null
    fi
  done
fi


# update the mime database
if [ -x usr/bin/update-mime-database ] ; then
 ${CHROOT} usr/bin/update-mime-database -q usr/share/mime 2> /dev/null
fi

I think this is the part which is most likely to be the root of the problem but I cannot see how. Any ideas?

Note: On Slackware 14.1 I can no more compile TeXmacs successfully (due to Guile being upgraded to version 2.0), so I can not make any tests using a freshly compiled package.

Didier Spaier 01-24-2014 04:38 AM

I'd suggest making a Slackware package using the SlackBuild provided @slackbuilds.org.

gengisdave 01-24-2014 04:50 AM

i think the problem is the first block of doints.sh, i've never seen using chroot; and the slackbuild linked by didier is the same without the chroot block

Ilgar 01-24-2014 05:06 AM

Thanks, I think I now see the reason: Instead of using the system-wide directories, this script updates the databases by scanning the to-be-installed local directories which are populated by TeXmacs-related files only.

I must have used src2pkg either because TeXmacs wasn't available at SB.org at the time or it was out-of-date. I'll try to test it with the latest src2pkg again. If the problem reoccurs I'll report it to gnashley. I'm marking the thread as "solved". Thanks again.

gnashley 01-24-2014 11:09 AM

Yes, please, I wuld like to know if that is indeed the problem.

enorbet 01-24-2014 12:39 PM

Frankly I wish OP would rename the title. It is very misleading about one of the main benefits of Slackware IMHO. It's almost like saying "My Slackware system keeps disappearing" and later mentioning you're running an init script that "rm -rf /*" :P


All times are GMT -5. The time now is 11:43 PM.