]> git.saurik.com Git - apt.git/commitdiff
apt-key: Only use readlink -f for existing components
authorJulian Andres Klode <jak@debian.org>
Tue, 23 Aug 2016 19:01:06 +0000 (21:01 +0200)
committerJulian Andres Klode <jak@debian.org>
Fri, 26 Aug 2016 20:17:54 +0000 (22:17 +0200)
On FreeBSD, readlink -f requires the last component
to exist.

cmdline/apt-key.in

index 81314c7f5fab1a4d94fb67afae5ed804bffae12c..21df37ffdf4aa0f01ca3dc9424a4c4e5569bb17a 100644 (file)
@@ -306,7 +306,7 @@ merge_all_trusted_keyrings_into_pubring() {
     # does the same as:
     # foreach_keyring_do 'import_keys_from_keyring' "${GPGHOMEDIR}/pubring.gpg"
     # but without using gpg, just cat and find
-    local PUBRING="$(readlink -f "${GPGHOMEDIR}/pubring.gpg")"
+    local PUBRING="$(readlink -f "${GPGHOMEDIR}")/pubring.gpg"
     # if a --keyring was given, just use this one
     if [ -n "$FORCED_KEYRING" ]; then
        if [ -s "$FORCED_KEYRING" ]; then