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.postinst < prev    next >
Encoding:
Text File  |  2007-04-04  |  1.6 KB  |  68 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" = "configure" ]
  15. then
  16.     opt=libc6-i686
  17.     curver=2.5-0ubuntu14
  18.  
  19.     if [ -f /etc/ld.so.hwcappkgs ]; then
  20.     rm -f /etc/ld.so.hwcappkgs.tmp
  21.     (while read LINE; do
  22.         case $LINE in
  23.         \#*|"") continue
  24.         esac
  25.         set -- $LINE
  26.         pkg=$1
  27.         if [ "$pkg" = "$opt" ]; then
  28.         # this package
  29.         ver=$curver
  30.         isrecorded=yes
  31.         else
  32.         # other packages
  33.         ver=$(checkpkgver $pkg)
  34.         if [ -n "$ver" ]; then
  35.             dpkg --compare-versions $curver ne $ver && optunmatch=yes
  36.         fi
  37.         fi
  38.         echo "$pkg $ver" >> /etc/ld.so.hwcappkgs.tmp
  39.     done) < /etc/ld.so.hwcappkgs
  40.     if [ "$isrecorded" != yes ]; then
  41.         echo "$opt $curver" >> /etc/ld.so.hwcappkgs.tmp
  42.     fi
  43.     mv /etc/ld.so.hwcappkgs.tmp /etc/ld.so.hwcappkgs
  44.     else
  45.     # libc6 did not create ld.so.hwcappkgs correctly or ld.so.hwcappkgs
  46.     # was unexpectedly removed.  Don't remove ld.so.nohwcap.
  47.     optunmatch=yes
  48.     fi
  49.  
  50.     # nohwcap during upgrade.
  51.     if [ -f /etc/ld.so.nohwcap ]; then
  52.     grep -v "^$opt\$" /etc/ld.so.nohwcap > /etc/ld.so.nohwcap.tmp || true
  53.     mv -f /etc/ld.so.nohwcap.tmp /etc/ld.so.nohwcap
  54.     if [ "$optunmatch" != "yes" ]; then
  55.         test -s /etc/ld.so.nohwcap || rm -f /etc/ld.so.nohwcap
  56.     fi
  57.     fi
  58. fi
  59.  
  60. # Automatically added by dh_makeshlibs
  61. if [ "$1" = "configure" ]; then
  62.     ldconfig
  63. fi
  64. # End automatically added section
  65.  
  66.  
  67. exit 0
  68.