If GNUPGHOME/.gpg-v21-migrated doesn't exist then gpg2.1 tries to do a data
migration.
If gpg-agent 2.0 (or earlier, if such exist) is running, then the migration
fails with:
gpg: starting migration from earlier GnuPG versions
gpg: porting secret keys from '/home/foo/.gnupg/secring.gpg' to gpg-agent
gpg: error getting the KEK: Unknown IPC command
gpg: migration succeeded
Even though success is claimed, no secret keys are actually imported into
GNUPGHOME/private-keys-v1.d.
To prevent this, GPG should verify that "getinfo version" does return 2.1.0 (or
greater). If it doesn't, then we can start a new gpg-agent (and optionally kill
the old one, but this may not be the safest approach). If the new one still
isn't version 2.1.0 then the user didn't upgrade the agent somehow and we should
abort.