~ubuntu-branches/ubuntu/maverick/apt/maverick-security

« back to all changes in this revision

Viewing changes to cmdline/apt-key

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-02-08 11:38:35 UTC
  • Revision ID: james.westby@ubuntu.com-20080208113835-yxqnp51k9arhn3az
Tags: 0.7.9ubuntu7
* methods/connect.cc:
  - remember hosts with Resolve failures or connect Timeouts
    see https://wiki.ubuntu.com/NetworklessInstallationFixes
* cmdlines/apt-key:
  - fix bug in the new apt-key update code that imports only
    keys signed with the master key (thanks to cjwatson)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    add_keys=`$GPG_CMD --keyring $ADD_KEYRING --with-colons --list-keys | grep ^pub | cut -d: -f5`
35
35
    master_keys=`$GPG_CMD --keyring $MASTER --with-colons --list-keys | grep ^pub | cut -d: -f5`
36
36
    for add_key in $add_keys; do
 
37
        ADDED=0
37
38
        for master_key in $master_keys; do
38
 
            if $GPG --list-sigs --with-colons $add_key | grep ^sig | cut -d: -f5 | grep -q $master_key; then
 
39
            if $GPG_CMD --keyring $ADD_KEYRING --list-sigs --with-colons $add_key | grep ^sig | cut -d: -f5 | grep -q $master_key; then
39
40
                $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export $add_key | $GPG --import
 
41
                ADDED=1
40
42
            fi
41
43
        done
 
44
        if [ $ADDED = 0 ]; then
 
45
            echo >&2 "Key '$add_key' not added. It is not signed with a master key"
 
46
        fi
42
47
    done
43
48
}
44
49