This file is indexed.

postinst is in debdelta 0.59.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh

set  -e

umask 0077

GPG_MASTER_PUB_KEYRING="/usr/share/keyrings/debian-debdelta-archive-keyring.gpg"
GPG_HOME="/etc/debdelta/gnupg"

sha1it () {
 (
    cd ${GPG_HOME}
    echo '#if this file is deleted or it does not match, then  ' > sha1_hashes.txt
    echo '# these files will not be removed when purging "debdelta"  ' >> sha1_hashes.txt
    sha1sum pubring.gpg  secring.gpg >> sha1_hashes.txt
    if test -f trustdb.gpg ; then sha1sum trustdb.gpg >> sha1_hashes.txt ; fi
 )
}

check1it () {
 (
  cd ${GPG_HOME}
  test -f sha1_hashes.txt && sha1sum -c --quiet sha1_hashes.txt
 )
}

case "$1" in
  configure|reconfigure)
    if test ! -r ${GPG_HOME} ; then
      echo "Debdelta: creating ${GPG_HOME}"
      mkdir ${GPG_HOME}
    fi
    if test ! -r ${GPG_HOME}/pubring.gpg -a \
            ! -r ${GPG_HOME}/secring.gpg   ; then
      echo "Debdelta: creating keyrings in ${GPG_HOME}"
      touch ${GPG_HOME}/secring.gpg  ${GPG_HOME}/pubring.gpg
      sha1it
    else
      echo "Debdelta: updating public keyring in ${GPG_HOME}"
    fi

    c=0 ;  if  check1it ; then   c=1 ;  fi
    gpg --no-tty --batch --no-options --no-auto-check-trustdb --homedir ${GPG_HOME} --import ${GPG_MASTER_PUB_KEYRING} || true
    gpgconf --homedir ${GPG_HOME} --kill gpg-agent || true
    if test $c = 1 ; then sha1it ; fi

    ;;
esac