Damn, another typo in the previous comment ("-edit-key" instead of "--edit-key"). Sorry sorry. Here is everything fixed with reduced line count:
$ mkdir test
$ gpg --homedir test --gen-key
$ gpg --homedir test --gen-key
$ gpg --homedir test --local-user name-of-second-key --sign-key name-of-first-key
$ gpg --homedir test --export name-of-first-key | gpg --homedir test --list-packets
Damn, another typo in the previous comment ("-edit-key" instead of "--edit-key"). Sorry sorry. Here is everything fixed with reduced line count:
$ mkdir test
$ gpg --homedir test --gen-key
$ gpg --homedir test --gen-key
$ gpg --homedir test --local-user name-of-second-key --sign-key name-of-first-key
$ gpg --homedir test --export name-of-first-key | gpg --homedir test --list-packets