sks-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sks-devel] Patches imported


From: Phil Pennock
Subject: Re: [Sks-devel] Patches imported
Date: Wed, 25 Mar 2009 23:04:56 -0700

On 2009-03-26 at 00:29 -0500, John Clizbe wrote:
> Phil Pennock wrote:
> > On 2009-03-25 at 22:20 -0400, Yaron Minsky wrote:
> >> I imported the proposed patches into the hg repo, with some minor changes.
> >> People should try it out, and if the reports are good, I'll bless it as the
> >> next release.
> >> 
> >> The repo can be found here:
> >> 
> >>    http://hg.minskyprimus.net/sks/trunk
> > 
> > The attached is deliberately as small as possible.
> <patch details snipped>
> 
> Pulled Hg repo and applied Phil's last patch.
> 
> Still seeing a problem with setting the dump name:
> 
> address@hidden:/var/sks# sks dump 27000 /var/sks/dump sks-dump
> wrong number of arguments
> usage: sksdump numkeys dumpdir [dumpname]
> address@hidden:/var/sks# sks dump 27000 /var/sks/dump
> Dumping keys to file /var/sks/dump/1-0000.pgp
> Dumping keys to file /var/sks/dump/1-0001.pgp
> 
> Any ideas folks?

You have a boolean option being set in your sksconf file with:
  optionname: 1

This is why I want the example in the docs -- booleans are not set with
a value.  So the "1" is not being picked up in setting the option.
Instead, it's left behind in !Settings.anonlist, looking like parameters
that come on the command-line after the options (the rest of argv).
Then when you invoke "sks dump" it uses !Settings.anonlist, which
contains the "1" followed by whatever you gave on the command-line.

Boolean options in sksconf can only be toggled away from their default
value, not given an explicit on or off.  You toggle it with the
optionname followed by a colon.  Remove the 1 and you should be good.

I found this all out when trying to figure out why I was getting dumps
called "on-<nnnn>.pgp" and eventually did this:
----------------------------8< cut here >8------------------------------
--- sks-new/sksdump.ml  2009-03-25 19:53:57.000000000 -0700
+++ sks-cur/sksdump.ml  2009-03-22 02:14:09.000000000 -0700
@@ -105,6 +105,8 @@
        | _ -> 
            raise Argument_error
     ) with Argument_error -> 
+      let foo = "{" ^ (String.concat "} {" !Settings.anonlist) ^ "}" in
+      eprintf "Saw anonlist: %s" foo;
       eprintf "wrong number of arguments\n";
       eprintf "usage: sksdump numkeys dumpdir [dumpname]\n";
       flush stderr;
----------------------------8< cut here >8------------------------------

Lightbulb moment.

-Phil

Attachment: pgpTV64k2zXsB.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]