}
load_lib mockgpg.exp
+load_lib keyindex.exp
# make_test_keyrings /some/dir/some/where {
# some-package-name {
# ...
# }
proc register_test_packages { base_dir packlist } {
+ set havekeys no
foreach { package info } $packlist {
file mkdir [file join $base_dir packages $package]
foreach { element value } $info { switch $element {
keys {
write_test_keyring \
[file join $base_dir packages $package pubring.gpg] $value
+ set havekeys yes
}
maintainers {
set c [open [file join $base_dir m.bypkg] a]
}
} }
}
+ if { $havekeys } {
+ write_key_index [file join $base_dir packages keyindex] $packlist
+ }
}
# make_test_case /some/dir/some/where {