]>
git.saurik.com Git - apt.git/blob - debian/preinst
5 # dpkg does this for us while we are upgrading..
6 #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
10 dpkg
-maintscript-helper rm_conffile
/etc
/apt
/apt.conf.d
/01ubuntu \
11 0.8.16~exp12ubuntu6
-- "$@"
13 if [ "$1" = "upgrade" -o "$1" = "install" -a "$2" != "" ]; then
14 if [ ! -e /var
/lib
/apt
-a -e /var
/state
/apt
]; then
15 # upgrading from /var/state/apt using apt.
16 # it's probably running now so we want to ensure /var/state/apt
17 # is still valid afterwards. and since we're upgrading
19 if [ -x /usr
/bin
/perl
-a -d /var
/state
/apt
-a ! -L /var
/state
/apt
] &&
20 perl
-e 'exit 1 if ((stat("/var/lib"))[0] != (stat("/var/state/apt"))[0])'
22 # same fs, we can mv it
23 mv /var
/state
/apt
/var
/lib
/apt
24 ln -s ..
/lib
/apt
/var
/state
/apt
25 # note that this symlink (/var/state/apt) will be removed when
26 # dpkg finishes unpacking the apt we're about to install; this is okay
28 # scary, let's just symlink it and hope
29 ln -s /var
/state
/apt
/var
/lib
/apt
32 touch /var
/lib
/apt
/lists
/partial
/.delete
-me-later || true