[dput-ng-maint] Bug#736555: Specifying (or not specifying) a host gives python errors

Paul Tagliamonte paultag at debian.org
Tue Mar 4 01:50:32 UTC 2014


Yo, Wookey, sorry for the lag, I totally missed this and only caught it
by looking over open bugs.

My fault completely. I'm very sorry.

On Fri, Jan 24, 2014 at 06:13:44PM +0000, Wookey wrote:
> I needed to set the permsission for a Debian Maintainer and found a
> doc that said dput-ng had a 'dcut dm' option to do this.
> 
> That meant upgrading to testing as dcut-ng in not installable on
> stable (due to python:any dep). A backport would be good there.

ACK. I did one a few weeks back, sorry it took so long.

> However I can't get it to do anything useful
> 
> $ dcut dm --uid 3FD37230 --allow libpaper paper psutils plptools
> Traceback (most recent call last):
>   File "/usr/bin/dcut", line 82, in <module>
>     profile = dput.profile.load_profile(None)
>   File "/usr/lib/python2.7/dist-packages/dput/profile.py", line 205, in load_profile
>     obj = config.get_config(block)
>   File "/usr/lib/python2.7/dist-packages/dput/profile.py", line 137, in get_config
>     obj = config.get_config(name)
>   File "/usr/lib/python2.7/dist-packages/dput/configs/dputcf.py", line 137, in get_config
>     items = self.parser.items(name)
>   File "/usr/lib/python2.7/ConfigParser.py", line 655, in items
>     for option in options]
>   File "/usr/lib/python2.7/ConfigParser.py", line 669, in _interpolate
>     option, section, rawval, e.args[0])
> ConfigParser.InterpolationMissingOptionError: Bad value substitution:
> 	section: [wookstuff]
> 	option : incoming
> 	key    : ppa
> 	rawval : ~%(ppa)s/ubuntu

Uh, yikes. This is not an error I've seen in a long time - this happens
when something's not expanding right in the ConfigParser (e.g. it
somehow didn't set the ppa value whilst rendering the config object),
which shouldn't happen (but it did, and that sucks, very sorry about
that).

> Which isn't very helpful but it looks like it might be trying the
> wrong upload host.

I agree. Super not helpful and I agree it looks like it's trying the
wrong host.

> So man dput tells me I can specify one so I try some more things:
> 
> $ dcut ftpmaster dm --uid 3FD37230 --allow psutils paper libpaper
> plptoolsTraceback (most recent call last):
>   File "/usr/bin/dcut", line 80, in <module>
>     profile = dput.profile.load_profile(known.host)
>   File "/usr/lib/python2.7/dist-packages/dput/profile.py", line 200, in load_profile
>     raise DputConfigurationError("Error, was given host, "
>     dput.exceptions.DputConfigurationError: Error, was given host, but
> we don't know about it.

This is the error I'd expect to see. Could it be that the package name
was the name of an active profile and it assumed it was the target? Is
there a profile called plptools on your box?

> Looks like the host name is blank?
> 
> I seem to get the same error whatever I put in as the second parameter

ftp-master - the error should be a bit more helpful, but that's seeing
"ftpmaster" which isn't a valid host (since it's "ftp-master"), but I
agree this also sucks.

> I probably just need to do some config, but the error handling here
> needs to be improved. note that I am a dupload user by default so may
> not have dput config correctly set up. (I did try using dput once but
> it had a major shortcoming: trying to change mode on ssh uploads
> _after uploading the changes file, which is incomptiable with
> inotify-based things that monitor incoming (you get a race) so I went
> back to dupload).

Hurm, interesting. Do you know offhand how dupload handles this? I'd
love to fix this.

> Aha 'ftp-master' works (helpful manpage example - thank-you).

Ah, right. Glad you found it. Sorry about that.

> So now I get a sensible error message about UIDs and keyrings, which
> is fair enough.

(which I'm about to clean up more)

> So my bug is 'give useful error messages from unknown or
> incorrectly-defaulted hosts', not a nasty python slurge.

I agree. Very sorry.

> 
> That message could say something like 'See the 'HOST' section in the
> dput manpage for details of valid names'

The command "dirt hosts" shows some entries, perhaps I need to dump
these when we get an "invalid" name.

Thanks for the report, sorry it took so long to reply.

Cheers,
  Paul

-- 
 .''`.  Paul Tagliamonte <paultag at debian.org>  |   Proud Debian Developer
: :'  : 4096R / 8F04 9AD8 2C92 066C 7352  D28A 7B58 5B30 807C 2A87
`. `'`  http://people.debian.org/~paultag
 `-     http://people.debian.org/~paultag/conduct-statement.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/dput-ng-maint/attachments/20140303/b7eca7f3/attachment.sig>


More information about the dput-ng-maint mailing list