drop old /var/state to /var/lib transition artefacts
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 30 Nov 2013 23:05:34 +0000 (00:05 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 1 Dec 2013 14:51:33 +0000 (15:51 +0100)
Regardless of when this transition was, it is so long ago that everyone
who would still need this has a million other problems to deal with now
so lets just drop this code.

apt-pkg/init.cc
debian/preinst [deleted file]

index 7627892..81b601a 100644 (file)
@@ -44,16 +44,8 @@ bool pkgInitConfig(Configuration &Cnf)
    Cnf.CndSet("APT::Install-Suggests", false);
    Cnf.CndSet("Dir","/");
    
-   // State   
+   // State
    Cnf.CndSet("Dir::State","var/lib/apt/");
-   
-   /* Just in case something goes horribly wrong, we can fall back to the
-      old /var/state paths.. */
-   struct stat St;   
-   if (stat("/var/lib/apt/.",&St) != 0 &&
-       stat("/var/state/apt/.",&St) == 0)
-      Cnf.CndSet("Dir::State","var/state/apt/");
-       
    Cnf.CndSet("Dir::State::lists","lists/");
    Cnf.CndSet("Dir::State::cdroms","cdroms.list");
    Cnf.CndSet("Dir::State::mirrors","mirrors/");
diff --git a/debian/preinst b/debian/preinst
deleted file mode 100755 (executable)
index 985ad9b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#! /bin/sh
-
-set -e
-
-# dpkg does this for us while we are upgrading..
-#if [ "$1" = "upgrade" -a -L /var/state/apt -a -e /var/lib/apt -a ! -L /var/state/apt ] && dpkg --compare-versions "$2" ">=" "0.4.10"; then
-#  rm /var/state/apt
-#fi
-
-if [ "$1" = "upgrade" -o "$1" = "install" -a "$2" != "" ]; then
-  if [ ! -e /var/lib/apt -a -e /var/state/apt ]; then
-    # upgrading from /var/state/apt using apt.
-    # it's probably running now so we want to ensure /var/state/apt
-    # is still valid afterwards. and since we're upgrading
-
-    if [ -x /usr/bin/perl -a -d /var/state/apt -a ! -L /var/state/apt ] &&
-      perl -e 'exit 1 if ((stat("/var/lib"))[0] != (stat("/var/state/apt"))[0])'
-    then
-      # same fs, we can mv it
-      mv /var/state/apt /var/lib/apt
-      ln -s ../lib/apt /var/state/apt
-      # note that this symlink (/var/state/apt) will be removed when
-      # dpkg finishes unpacking the apt we're about to install; this is okay
-    else
-      # scary, let's just symlink it and hope
-      ln -s /var/state/apt /var/lib/apt
-    fi
-  fi
-  touch /var/lib/apt/lists/partial/.delete-me-later || true
-fi
-
-#DEBHELPER#