From: Julian Andres Klode Date: Fri, 26 Aug 2016 22:31:03 +0000 (+0200) Subject: Merge branch 'portability/freebsd' X-Git-Tag: 1.3_rc3~10 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/6a68315e938eb2611806658828ecea86805822e7 Merge branch 'portability/freebsd' --- 6a68315e938eb2611806658828ecea86805822e7 diff --cc cmdline/apt-key.in index 199903d61,21df37ffd..0c10e5955 --- a/cmdline/apt-key.in +++ b/cmdline/apt-key.in @@@ -321,10 -306,31 +321,10 @@@ 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 - cp --dereference "$FORCED_KEYRING" "$PUBRING" - fi - else - # otherwise all known keyrings are merged - local TRUSTEDPARTS="/etc/apt/trusted.gpg.d" - eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d) - if [ -d "$TRUSTEDPARTS" ]; then - rm -f "$PUBRING" - if [ -s "$TRUSTEDFILE" ]; then - cat "$TRUSTEDFILE" > "$PUBRING" - fi - TRUSTEDPARTS="$(readlink -f "$TRUSTEDPARTS")" - (cd /; find "$TRUSTEDPARTS" -mindepth 1 -maxdepth 1 -name '*.gpg' -exec cat {} + >> "$PUBRING";) - elif [ -s "$TRUSTEDFILE" ]; then - cp --dereference "$TRUSTEDFILE" "$PUBRING" - fi - fi - - if [ ! -s "$PUBRING" ]; then - touch "$PUBRING" - fi + rm -f "$PUBRING" + touch "$PUBRING" + foreach_keyring_do 'catfile' "$PUBRING" } import_keys_from_keyring() { diff --cc test/integration/framework index 0daf776f5,c513ed12c..62720fedd --- a/test/integration/framework +++ b/test/integration/framework @@@ -872,10 -911,9 +911,10 @@@ Maintainer: Joe Sixpack > "${PPATH}/Packages" done