Debian Bug report logs - #736555
Specifying (or not specifying) a host gives python errors

version graph

Package: dput-ng; Maintainer for dput-ng is dput-ng Maintainers <[email protected]>; Source for dput-ng is src:dput-ng (PTS, buildd, popcon).

Reported by: Wookey <[email protected]>

Date: Fri, 24 Jan 2014 21:39:01 UTC

Severity: important

Found in version dput-ng/1.7

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], dput-ng Maintainers <[email protected]>:
Bug#736555; Package dput-ng. (Fri, 24 Jan 2014 21:39:06 GMT) (full text, mbox, link).


Acknowledgement sent to Wookey <[email protected]>:
New Bug report received and forwarded. Copy sent to dput-ng Maintainers <[email protected]>. (Fri, 24 Jan 2014 21:39:06 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Wookey <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: Specifying (or not specifying) a host gives python errors
Date: Fri, 24 Jan 2014 18:13:44 +0000
Package: dput-ng
Version: 1.7
Severity: important

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.

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

Which isn't very helpful but it looks like it might be trying the
wrong upload 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.

Looks like the host name is blank?

I seem to get the same error whatever I put in as the second parameter

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).

Aha 'ftp-master' works (helpful manpage example - thank-you).
So now I get a sensible error message about UIDs and keyrings, which
is fair enough.

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

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

cheers

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dput-ng depends on:
ii  python-dput  1.7
pn  python:any   <none>

Versions of packages dput-ng recommends:
ii  bash-completion  1:2.1-2

dput-ng suggests no packages.

-- no debconf information



Information forwarded to [email protected], dput-ng Maintainers <[email protected]>:
Bug#736555; Package dput-ng. (Tue, 04 Mar 2014 01:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Tagliamonte <[email protected]>:
Extra info received and forwarded to list. Copy sent to dput-ng Maintainers <[email protected]>. (Tue, 04 Mar 2014 01:54:04 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Paul Tagliamonte <[email protected]>
To: Wookey <[email protected]>, [email protected]
Subject: Re: Bug#736555: Specifying (or not specifying) a host gives python errors
Date: Mon, 3 Mar 2014 20:50:32 -0500
[Message part 1 (text/plain, inline)]
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 <[email protected]>  |   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
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 12:50:00 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.