mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-07 05:42:42 +00:00
Fix up other code to support new GPG provider structure
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ func getVerifier(flags *flag.FlagSet) (pgp.Verifier, error) {
|
||||
|
||||
keyRings := flags.Lookup("keyring").Value.Get().([]string)
|
||||
|
||||
verifier := &pgp.GpgVerifier{}
|
||||
verifier := context.GetVerifier()
|
||||
for _, keyRing := range keyRings {
|
||||
verifier.AddKeyring(keyRing)
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ func getSigner(flags *flag.FlagSet) (pgp.Signer, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
signer := &pgp.GpgSigner{}
|
||||
signer := context.GetSigner()
|
||||
signer.SetKey(flags.Lookup("gpg-key").Value.String())
|
||||
signer.SetKeyRing(flags.Lookup("keyring").Value.String(), flags.Lookup("secret-keyring").Value.String())
|
||||
signer.SetPassphrase(flags.Lookup("passphrase").Value.String(), flags.Lookup("passphrase-file").Value.String())
|
||||
|
||||
+1
-2
@@ -6,7 +6,6 @@ import (
|
||||
|
||||
"github.com/smira/aptly/aptly"
|
||||
"github.com/smira/aptly/deb"
|
||||
"github.com/smira/aptly/pgp"
|
||||
"github.com/smira/aptly/utils"
|
||||
"github.com/smira/commander"
|
||||
"github.com/smira/flag"
|
||||
@@ -21,7 +20,7 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
||||
|
||||
name := args[0]
|
||||
|
||||
verifier := &pgp.GpgVerifier{}
|
||||
verifier := context.GetVerifier()
|
||||
|
||||
repo, err := context.CollectionFactory().LocalRepoCollection().ByName(name)
|
||||
if err != nil {
|
||||
|
||||
+1
-2
@@ -9,7 +9,6 @@ import (
|
||||
|
||||
"github.com/smira/aptly/aptly"
|
||||
"github.com/smira/aptly/deb"
|
||||
"github.com/smira/aptly/pgp"
|
||||
"github.com/smira/aptly/query"
|
||||
"github.com/smira/aptly/utils"
|
||||
"github.com/smira/commander"
|
||||
@@ -29,7 +28,7 @@ func aptlyRepoInclude(cmd *commander.Command, args []string) error {
|
||||
}
|
||||
|
||||
if verifier == nil {
|
||||
verifier = &pgp.GpgVerifier{}
|
||||
verifier = context.GetVerifier()
|
||||
}
|
||||
|
||||
forceReplace := context.Flags().Lookup("force-replace").Value.Get().(bool)
|
||||
|
||||
Reference in New Issue
Block a user