Your message dated Fri, 14 Jan 2005 19:30:44 -0600
with message-id <[EMAIL PROTECTED]>
and subject line Bug#290512: wajig: no longer works from root cron: KeyError: 
'USER'
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 14 Jan 2005 14:52:09 +0000
>From [EMAIL PROTECTED] Fri Jan 14 06:52:08 2005
Return-path: <[EMAIL PROTECTED]>
Received: from nat20.camtrial.co.uk (cdmnet.org) [193.117.99.116] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1CpSo4-00073H-00; Fri, 14 Jan 2005 06:52:08 -0800
Received: from calum by cdmnet.org with local (Exim 4.34)
        id 1CpSnz-0007g9-GT; Fri, 14 Jan 2005 14:52:03 +0000
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Calum Mackay <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: wajig: no longer works from root cron: KeyError: 'USER'
X-Mailer: reportbug 3.5
Date: Fri, 14 Jan 2005 14:52:03 +0000
Message-Id: <[EMAIL PROTECTED]>
Sender: Calum Mackay <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: wajig
Version: 2.0.19-1
Severity: normal

For the last few days, certain wajig commands fail when run from root's
cron:

+ wajig update
Traceback (most recent call last):
  File "/usr/share/wajig/wajig.py", line 31, in ?
    import documentation,commands,changes,perform
  File "/usr/share/wajig/commands.py", line 43, in ?
    import changes
  File "/usr/share/wajig/changes.py", line 47, in ?
    import perform
  File "/usr/share/wajig/perform.py", line 34, in ?
    if os.path.exists("/usr/bin/sudo") and os.environ['USER'] <> 'root':
  File "/usr/lib/python2.3/UserDict.py", line 19, in __getitem__
    def __getitem__(self, key): return self.data[key]
KeyError: 'USER'
+ wajig describe-new
Traceback (most recent call last):
  File "/usr/share/wajig/wajig.py", line 31, in ?
    import documentation,commands,changes,perform
  File "/usr/share/wajig/commands.py", line 43, in ?
    import changes
  File "/usr/share/wajig/changes.py", line 47, in ?
    import perform
  File "/usr/share/wajig/perform.py", line 34, in ?
    if os.path.exists("/usr/bin/sudo") and os.environ['USER'] <> 'root':
  File "/usr/lib/python2.3/UserDict.py", line 19, in __getitem__
    def __getitem__(self, key): return self.data[key]
KeyError: 'USER'

and others (new-upgrades, toupgrade, auto-download).

There's no USER set in the cron environment, I think you should use
LOGNAME instead.

cheers,
c.


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.9
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages wajig depends on:
ii  apt                           0.5.27.2   Advanced front-end for dpkg
ii  python                        2.3.4-5    An interactive high-level object-o
ii  python-apt                    0.5.10     Python interface to libapt-pkg

-- no debconf information

---------------------------------------
Received: (at 290512-done) by bugs.debian.org; 15 Jan 2005 01:31:13 +0000
>From [EMAIL PROTECTED] Fri Jan 14 17:31:13 2005
Return-path: <[EMAIL PROTECTED]>
Received: from rwcrmhc12.comcast.net [216.148.227.85] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1CpcmX-0003Ek-00; Fri, 14 Jan 2005 17:31:13 -0800
Received: from sonny.eddelbuettel.com (eddelbuettel.com[24.14.160.2])
          by comcast.net (rwcrmhc12) with ESMTP
          id <20050115013039014000vr4oe>; Sat, 15 Jan 2005 01:30:43 +0000
Received: from edd by sonny.eddelbuettel.com with local (Exim 3.35 #1 (Debian))
        id 1Cpcm4-0006dd-00; Fri, 14 Jan 2005 19:30:44 -0600
Date: Fri, 14 Jan 2005 19:30:44 -0600
From: Dirk Eddelbuettel <[EMAIL PROTECTED]>
To: Graham Williams <[EMAIL PROTECTED]>,
        [EMAIL PROTECTED]
Cc: Calum Mackay <[EMAIL PROTECTED]>
Subject: Re: Bug#290512: wajig: no longer works from root cron: KeyError: 'USER'
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.3.28i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

On Sat, Jan 15, 2005 at 07:16:02AM +1100, Graham Williams wrote:
> Received Sat 15 Jan 2005  3:47am +1100 from Calum Mackay:
> > Package: wajig
> > Version: 2.0.19-1
> > Severity: normal
> > 
> > For the last few days, certain wajig commands fail when run from root's
> > cron:
> > 
> > + wajig update
> > Traceback (most recent call last):
> >   File "/usr/share/wajig/wajig.py", line 31, in ?
> >     import documentation,commands,changes,perform
> >   File "/usr/share/wajig/commands.py", line 43, in ?
> >     import changes
> >   File "/usr/share/wajig/changes.py", line 47, in ?
> >     import perform
> >   File "/usr/share/wajig/perform.py", line 34, in ?
> >     if os.path.exists("/usr/bin/sudo") and os.environ['USER'] <> 'root':
> >   File "/usr/lib/python2.3/UserDict.py", line 19, in __getitem__
> >     def __getitem__(self, key): return self.data[key]
> > KeyError: 'USER'
> > + wajig describe-new
> > Traceback (most recent call last):
> >   File "/usr/share/wajig/wajig.py", line 31, in ?
> >     import documentation,commands,changes,perform
> >   File "/usr/share/wajig/commands.py", line 43, in ?
> >     import changes
> >   File "/usr/share/wajig/changes.py", line 47, in ?
> >     import perform
> >   File "/usr/share/wajig/perform.py", line 34, in ?
> >     if os.path.exists("/usr/bin/sudo") and os.environ['USER'] <> 'root':
> >   File "/usr/lib/python2.3/UserDict.py", line 19, in __getitem__
> >     def __getitem__(self, key): return self.data[key]
> > KeyError: 'USER'
> > 
> > and others (new-upgrades, toupgrade, auto-download).
> > 
> > There's no USER set in the cron environment, I think you should use
> > LOGNAME instead.
> 
> Thanks for the bug report Calum. This has been fixed by Dirk in the
> just released wajig 2.0.19-2.  Sorry about that problem.

Yup, sorry from here too. I didn't get to my cron folder for a few days
which is how this lingered.

Closing it now, though, as 2.0.19-2 addresses it. Thanks to Graham for
working out how to get that done.

Dirk

-- 
Better to have an approximate answer to the right question than a precise 
answer to the wrong question.  --  John Tukey as quoted by John Chambers


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to