summaryrefslogtreecommitdiff
path: root/cmdline/apt-key
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-02-13 15:44:01 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2008-02-13 15:44:01 +0100
commit1f31762e69fd52fc67306d4b8af98c4e4519e2e4 (patch)
treee1eaf59b703d7e2bdbac74a68cbdde3fc84f6773 /cmdline/apt-key
parentb08f3f535b7c55202345ae44143a202fa186afea (diff)
parent93886541b35bf232e2a03eca01e39ddea2137111 (diff)
merged net-update fixes from apt--mvo
Diffstat (limited to 'cmdline/apt-key')
-rwxr-xr-xcmdline/apt-key13
1 files changed, 12 insertions, 1 deletions
diff --git a/cmdline/apt-key b/cmdline/apt-key
index 533193901..e0c4b5e48 100755
--- a/cmdline/apt-key
+++ b/cmdline/apt-key
@@ -58,8 +58,19 @@ net_update() {
if [ ! -d /var/lib/apt/keyrings ]; then
mkdir -p /var/lib/apt/keyrings
fi
+ keyring=/var/lib/apt/keyrings/$(basename $ARCHIVE_KEYRING)
+ old_mtime=0
+ if [ -e $keyring ]; then
+ old_mtime=$(stat -c %Y $keyring)
+ fi
(cd /var/lib/apt/keyrings; wget -q -N $ARCHIVE_KEYRING_URI)
- add_keys_with_verify_against_master_keyring /var/lib/apt/keyrings/$(basename $ARCHIVE_KEYRING) $MASTER_KEYRING
+ if [ ! -e $keyring ]; then
+ return
+ fi
+ new_mtime=$(stat -c %Y $keyring)
+ if [ $new_mtime -ne $old_mtime ]; then
+ add_keys_with_verify_against_master_keyring $keyring $MASTER_KEYRING
+ fi
}
update() {