apt: Remove cdrom code for slight size shrink
[termux-packages] / packages / apt / cmdline-apt-key.in.patch
CommitLineData
68faa04f
FF
1diff -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
d18c472a 3+++ ./cmdline/apt-key.in 2015-12-03 21:22:35.231730185 -0500
68faa04f
FF
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)
d18c472a
FF
25@@ -282,11 +279,11 @@
26 # if a --keyring was given, just use this one
27 if [ -n "$FORCED_KEYRING" ]; then
28 if [ -s "$FORCED_KEYRING" ]; then
29- cp --dereference "$FORCED_KEYRING" "$PUBRING"
30+ cp "$FORCED_KEYRING" "$PUBRING"
68faa04f
FF
31 fi
32 else
33 # otherwise all known keyrings are merged
34- local TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
35+ local TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
36 eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)
37 if [ -d "$TRUSTEDPARTS" ]; then
38 # ignore errors mostly for non-existing $TRUSTEDFILE
d18c472a
FF
39@@ -297,7 +294,7 @@
40 done
41 } > "$PUBRING" 2>/dev/null
42 elif [ -s "$TRUSTEDFILE" ]; then
43- cp --dereference "$TRUSTEDFILE" "$PUBRING"
44+ cp "$TRUSTEDFILE" "$PUBRING"
45 fi
46 fi
47
68faa04f
FF
48@@ -441,7 +438,7 @@
49 done
50
51 if [ -z "$TRUSTEDFILE" ]; then
52- TRUSTEDFILE="/etc/apt/trusted.gpg"
53+ TRUSTEDFILE="@TERMUX_PREFIX@/etc/apt/trusted.gpg"
54 eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring)
55 eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f)
56 fi