home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libc6-i686.postrm < prev    next >
Encoding:
Text File  |  2007-04-04  |  1.4 KB  |  59 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. checkpkgver () {
  6.     local status pkg
  7.     pkg=$1
  8.     status=$(dpkg -s $pkg 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
  9.     if [ -n "$status" ] && [ "$status" != "not-installed" ] && [ "$status" != "config-files" ]; then
  10.     echo $(dpkg -s $pkg 2>/dev/null | grep ^Version: | sed -e 's/^Version: *//');
  11.     fi
  12. }
  13.  
  14. if [ "$1" = "remove" ]; then
  15.     opt=libc6-i686
  16.     curver=2.5-0ubuntu14
  17.  
  18.     if [ -f /etc/ld.so.hwcappkgs ]; then
  19.     # Remove this package's entry
  20.     grep -v "^$opt " /etc/ld.so.hwcappkgs > /etc/ld.so.hwcappkgs.tmp
  21.     mv /etc/ld.so.hwcappkgs.tmp /etc/ld.so.hwcappkgs
  22.  
  23.     # Check other hwcap packges are consistent.
  24.     while read LINE; do
  25.         case $LINE in
  26.         \#*|"") continue
  27.         esac
  28.         set -- $LINE
  29.         pkg=$1
  30.         if [ -z "$prever" ]; then
  31.         prever=$(checkpkgver $pkg)
  32.         else
  33.         ver=$(checkpkgver $pkg)
  34.         if [ -n "$ver" ]; then
  35.             dpkg --compare-versions $prever ne $ver && optunmatch=yes
  36.         fi
  37.         fi
  38.     done < /etc/ld.so.hwcappkgs
  39.     else
  40.     # libc6 did not create ld.so.hwcappkgs correctly or ld.so.hwcappkgs
  41.     # was unexpectedly removed.  Don't remove ld.so.nohwcap.
  42.     optunmatch=yes
  43.     fi
  44.  
  45.     # Remove ld.so.nohwcap
  46.     if [ -f /etc/ld.so.nohwcap ] && [ ! -s /etc/ld.so.nohwcap ] && [ "$optunmatch" != yes ]; then
  47.     rm -f /etc/ld.so.nohwcap
  48.     fi
  49. fi
  50.  
  51. # Automatically added by dh_makeshlibs
  52. if [ "$1" = "remove" ]; then
  53.     ldconfig
  54. fi
  55. # End automatically added section
  56.  
  57.  
  58. exit 0
  59.