chiark / gitweb /
86ba52e3515b0745583295a30763ec20f56bbc57
[termux-packages] / packages / apt / cmdline-apt-key.in.patch
1 diff -u -r ../apt-1.1.3/cmdline/apt-key.in ./cmdline/apt-key.in
2 --- ../apt-1.1.3/cmdline/apt-key.in     2015-11-30 03:08:24.000000000 -0500
3 +++ ./cmdline/apt-key.in        2015-12-03 16:55:22.860914040 -0500
4 @@ -19,10 +19,7 @@
5  aptkey_echo() { echo "$@"; }
6  
7  requires_root() {
8 -       if [ "$(id -u)" -ne 0 ]; then
9 -               echo >&2 "ERROR: This command can only be used by root."
10 -               exit 1
11 -       fi
12 +       continue
13  }
14  
15  get_fingerprints_of_keyring() {
16 @@ -212,7 +209,7 @@
17         if [ -s "$TRUSTEDFILE" ]; then
18             $ACTION "$TRUSTEDFILE" "$@"
19         fi
20 -       local TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
21 +       local TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
22         eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)
23         if [ -d "$TRUSTEDPARTS" ]; then
24             # strip / suffix as gpg will double-slash in that case (#665411)
25 @@ -286,7 +283,7 @@
26         fi
27      else
28         # otherwise all known keyrings are merged
29 -       local TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
30 +       local TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
31         eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)
32         if [ -d "$TRUSTEDPARTS" ]; then
33             # ignore errors mostly for non-existing $TRUSTEDFILE
34 @@ -441,7 +438,7 @@
35  done
36  
37  if [ -z "$TRUSTEDFILE" ]; then
38 -   TRUSTEDFILE="/etc/apt/trusted.gpg"
39 +   TRUSTEDFILE="@TERMUX_PREFIX@/etc/apt/trusted.gpg"
40     eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring)
41     eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f)
42  fi