FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Alt

 
 
LinkBack Thread Tools
 
Old 08-28-2011, 11:40 PM
Alan Hourihane
 
Default portage bug ?

This just happened to me after a package emerge....

Traceback (most recent call last):
File "/usr/bin/emerge", line 44, in <module>
retval = emerge_main()
File "/j/usr/lib/portage/pym/_emerge/main.py", line 1909, in emerge_main
trees, mtimedb, retval)
File "/j/usr/lib/portage/pym/_emerge/main.py", line 370, in post_emerge
infodirs, info_mtimes, retval)
File "/j/usr/lib/portage/pym/_emerge/main.py", line 164, in
chk_updated_info_files
"--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
TypeError: not all arguments converted during string formatting

Alan.
 
Old 08-29-2011, 09:30 AM
Burcin Erocal
 
Default portage bug ?

Hi,

On Mon, 29 Aug 2011 00:40:21 +0100
Alan Hourihane <alanh@fairlite.co.uk> wrote:

> This just happened to me after a package emerge....
>
> Traceback (most recent call last):
> File "/usr/bin/emerge", line 44, in <module>
> retval = emerge_main()
> File "/j/usr/lib/portage/pym/_emerge/main.py", line 1909, in
> emerge_main trees, mtimedb, retval)
> File "/j/usr/lib/portage/pym/_emerge/main.py", line 370, in
> post_emerge infodirs, info_mtimes, retval)
> File "/j/usr/lib/portage/pym/_emerge/main.py", line 164, in
> chk_updated_info_files
> "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
> TypeError: not all arguments converted during string formatting

I also ran into this last week. The following patch fixes the problem for me. It seems to be introduced in the prefix version of portage.

Cheers,
Burcin


--- prefix-portage-2.2.01.19011.org/pym/_emerge/main.py 2011-08-24 13:55:50.326357336 +0200
+++ prefix-portage-2.2.01.19011.1/pym/_emerge/main.py 2011-08-24 17:42:24.960793637 +0200
@@ -160,8 +160,8 @@
del e
processed_count += 1
myso = portage.subprocess_getstatusoutput(
- "LANG=C LANGUAGE=C %s/usr/bin/install-info " +
- "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
+ ("LANG=C LANGUAGE=C %s/usr/bin/install-info " +
+ "--dir-file=%s/dir %s/%s") % (EPREFIX, inforoot, inforoot, x))[1]
existsstr="already exists, for file `"
if myso!="":
if
re.search(existsstr,myso):
 
Old 08-29-2011, 09:42 AM
Fabian Groffen
 
Default portage bug ?

On 29-08-2011 11:30:46 +0200, Burcin Erocal wrote:
> > "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
> > TypeError: not all arguments converted during string formatting
>
> I also ran into this last week. The following patch fixes the problem for me. It seems to be introduced in the prefix version of portage.
>

Thanks, there was a bug about it, I now see there is a ) missing. I'll
apply your patch soon.


> --- prefix-portage-2.2.01.19011.org/pym/_emerge/main.py 2011-08-24 13:55:50.326357336 +0200
> +++ prefix-portage-2.2.01.19011.1/pym/_emerge/main.py 2011-08-24 17:42:24.960793637 +0200
> @@ -160,8 +160,8 @@
> del e
> processed_count += 1
> myso = portage.subprocess_getstatusoutput(
> - "LANG=C LANGUAGE=C %s/usr/bin/install-info " +
> - "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
> + ("LANG=C LANGUAGE=C %s/usr/bin/install-info " +
> + "--dir-file=%s/dir %s/%s") % (EPREFIX, inforoot, inforoot, x))[1]
> existsstr="already exists, for file `"
> if myso!="":
> if
> re.search(existsstr,myso):
>
>
>

--
Fabian Groffen
Gentoo on a different level
 
Old 08-29-2011, 07:05 PM
Fabian Groffen
 
Default portage bug ?

On 29-08-2011 11:42:03 +0200, Fabian Groffen wrote:
> On 29-08-2011 11:30:46 +0200, Burcin Erocal wrote:
> > > "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
> > > TypeError: not all arguments converted during string formatting
> >
> > I also ran into this last week. The following patch fixes the problem for me. It seems to be introduced in the prefix version of portage.
> >
>
> Thanks, there was a bug about it, I now see there is a ) missing. I'll
> apply your patch soon.

I've been looking at default, and didn't find extra parenthesis there,
so I tried the following. Does that work for you?

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff;h=749ef8e20137bede1a98244 48b2676224b06f71b;hp=5b6156b085ab5ae518fa6c4ed9b2e 2c5b75fd184
or
http://prefix.gentooexperimental.org:8000/portage-prefix/rev/4e2a4854863a


--
Fabian Groffen
Gentoo on a different level
 
Old 08-31-2011, 12:13 AM
Alan Hourihane
 
Default portage bug ?

On 08/29/11 20:05, Fabian Groffen wrote:
> On 29-08-2011 11:42:03 +0200, Fabian Groffen wrote:
>> On 29-08-2011 11:30:46 +0200, Burcin Erocal wrote:
>>>> "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
>>>> TypeError: not all arguments converted during string formatting
>>> I also ran into this last week. The following patch fixes the problem for me. It seems to be introduced in the prefix version of portage.
>>>
>> Thanks, there was a bug about it, I now see there is a ) missing. I'll
>> apply your patch soon.
> I've been looking at default, and didn't find extra parenthesis there,
> so I tried the following. Does that work for you?
>
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff;h=749ef8e20137bede1a98244 48b2676224b06f71b;hp=5b6156b085ab5ae518fa6c4ed9b2e 2c5b75fd184
> or
> http://prefix.gentooexperimental.org:8000/portage-prefix/rev/4e2a4854863a
>

Didn't work.....

Traceback (most recent call last):
File "/usr/bin/emerge", line 44, in <module>
retval = emerge_main()
File "/j/usr/lib/portage/pym/_emerge/main.py", line 1909, in emerge_main
trees, mtimedb, retval)
File "/j/usr/lib/portage/pym/_emerge/main.py", line 370, in post_emerge
infodirs, info_mtimes, retval)
File "/j/usr/lib/portage/pym/_emerge/main.py", line 164, in
chk_updated_info_files
"--dir-file=%s/dir %s/%s" % (_unicode_decode(EPREFIX), inforoot,
inforoot, x))[1]
TypeError: not all arguments converted during string formatting


Alan.
 
Old 08-31-2011, 09:28 AM
Alan Hourihane
 
Default portage bug ?

On 08/31/11 01:13, Alan Hourihane wrote:
> On 08/29/11 20:05, Fabian Groffen wrote:
>> On 29-08-2011 11:42:03 +0200, Fabian Groffen wrote:
>>> On 29-08-2011 11:30:46 +0200, Burcin Erocal wrote:
>>>>> "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
>>>>> TypeError: not all arguments converted during string formatting
>>>> I also ran into this last week. The following patch fixes the problem for me. It seems to be introduced in the prefix version of portage.
>>>>
>>> Thanks, there was a bug about it, I now see there is a ) missing. I'll
>>> apply your patch soon.
>> I've been looking at default, and didn't find extra parenthesis there,
>> so I tried the following. Does that work for you?
>>
>> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff;h=749ef8e20137bede1a98244 48b2676224b06f71b;hp=5b6156b085ab5ae518fa6c4ed9b2e 2c5b75fd184
>> or
>> http://prefix.gentooexperimental.org:8000/portage-prefix/rev/4e2a4854863a
>>
> Didn't work.....
>
> Traceback (most recent call last):
> File "/usr/bin/emerge", line 44, in <module>
> retval = emerge_main()
> File "/j/usr/lib/portage/pym/_emerge/main.py", line 1909, in emerge_main
> trees, mtimedb, retval)
> File "/j/usr/lib/portage/pym/_emerge/main.py", line 370, in post_emerge
> infodirs, info_mtimes, retval)
> File "/j/usr/lib/portage/pym/_emerge/main.py", line 164, in
> chk_updated_info_files
> "--dir-file=%s/dir %s/%s" % (_unicode_decode(EPREFIX), inforoot,
> inforoot, x))[1]
> TypeError: not all arguments converted during string formatting
>
>
Using this seemed to work ....

"--dir-file="+EPREFIX+inforoot+"/dir "+EPREFIX+inforoot+"/"+x)[1]

Alan.
 
Old 08-31-2011, 09:29 AM
Alan Hourihane
 
Default portage bug ?

On 08/31/11 10:28, Alan Hourihane wrote:
> On 08/31/11 01:13, Alan Hourihane wrote:
>> On 08/29/11 20:05, Fabian Groffen wrote:
>>> On 29-08-2011 11:42:03 +0200, Fabian Groffen wrote:
>>>> On 29-08-2011 11:30:46 +0200, Burcin Erocal wrote:
>>>>>> "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
>>>>>> TypeError: not all arguments converted during string formatting
>>>>> I also ran into this last week. The following patch fixes the problem for me. It seems to be introduced in the prefix version of portage.
>>>>>
>>>> Thanks, there was a bug about it, I now see there is a ) missing. I'll
>>>> apply your patch soon.
>>> I've been looking at default, and didn't find extra parenthesis there,
>>> so I tried the following. Does that work for you?
>>>
>>> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff;h=749ef8e20137bede1a98244 48b2676224b06f71b;hp=5b6156b085ab5ae518fa6c4ed9b2e 2c5b75fd184
>>> or
>>> http://prefix.gentooexperimental.org:8000/portage-prefix/rev/4e2a4854863a
>>>
>> Didn't work.....
>>
>> Traceback (most recent call last):
>> File "/usr/bin/emerge", line 44, in <module>
>> retval = emerge_main()
>> File "/j/usr/lib/portage/pym/_emerge/main.py", line 1909, in emerge_main
>> trees, mtimedb, retval)
>> File "/j/usr/lib/portage/pym/_emerge/main.py", line 370, in post_emerge
>> infodirs, info_mtimes, retval)
>> File "/j/usr/lib/portage/pym/_emerge/main.py", line 164, in
>> chk_updated_info_files
>> "--dir-file=%s/dir %s/%s" % (_unicode_decode(EPREFIX), inforoot,
>> inforoot, x))[1]
>> TypeError: not all arguments converted during string formatting
>>
>>
> Using this seemed to work ....
>
> "--dir-file="+EPREFIX+inforoot+"/dir "+EPREFIX+inforoot+"/"+x)[1]
>

Ugh, but I got this....

* Regenerating GNU info directory index...
* Processed 83 info files; 83 errors.
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control
/bin/bash: line 0: fg: no job control

So maybe it didn't.

Alan.
 
Old 08-31-2011, 09:45 AM
Burcin Erocal
 
Default portage bug ?

On Mon, 29 Aug 2011 21:05:20 +0200
Fabian Groffen <grobian@gentoo.org> wrote:

> On 29-08-2011 11:42:03 +0200, Fabian Groffen wrote:
> > On 29-08-2011 11:30:46 +0200, Burcin Erocal wrote:
> > > > "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot,
> > > > x))[1] TypeError: not all arguments converted during string
> > > > formatting
> > >
> > > I also ran into this last week. The following patch fixes the
> > > problem for me. It seems to be introduced in the prefix version
> > > of portage.
> > >
> >
> > Thanks, there was a bug about it, I now see there is a ) missing.
> > I'll apply your patch soon.
>
> I've been looking at default, and didn't find extra parenthesis there,
> so I tried the following. Does that work for you?
>
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff;h=749ef8e20137bede1a98244 48b2676224b06f71b;hp=5b6156b085ab5ae518fa6c4ed9b2e 2c5b75fd184
> or
> http://prefix.gentooexperimental.org:8000/portage-prefix/rev/4e2a4854863a

I didn't have time to test the patch myself, since we already have a
report of it not working, here is a justification for my patch...

AFAICT, the original error message indicates that more arguments are
provided to % than there are place holders in the string. The +
operator has lower precedence than %, so the string is not concatenated
with the part on the previous line. Note that the string in the error
message has 3 place holders only, the fourth should come from the line
above. I added parenthesis around the string addition to fix the
precedence problem.


Cheers,
Burcin
 
Old 08-31-2011, 09:46 AM
Fabian Groffen
 
Default portage bug ?

On 31-08-2011 11:45:27 +0200, Burcin Erocal wrote:
> I didn't have time to test the patch myself, since we already have a
> report of it not working, here is a justification for my patch...
>
> AFAICT, the original error message indicates that more arguments are
> provided to % than there are place holders in the string. The +
> operator has lower precedence than %, so the string is not concatenated
> with the part on the previous line. Note that the string in the error
> message has 3 place holders only, the fourth should come from the line
> above. I added parenthesis around the string addition to fix the
> precedence problem.

Aha. That explains. Now I understand why the fix fixes it as well.
I'll apply it ASAP. Thanks a lot!


--
Fabian Groffen
Gentoo on a different level
 
Old 08-31-2011, 01:09 PM
Burcin Erocal
 
Default portage bug ?

On Wed, 31 Aug 2011 11:46:54 +0200
Fabian Groffen <grobian@gentoo.org> wrote:

> On 31-08-2011 11:45:27 +0200, Burcin Erocal wrote:
> > I didn't have time to test the patch myself, since we already have a
> > report of it not working, here is a justification for my patch...
> >
> > AFAICT, the original error message indicates that more arguments are
> > provided to % than there are place holders in the string. The +
> > operator has lower precedence than %, so the string is not
> > concatenated with the part on the previous line. Note that the
> > string in the error message has 3 place holders only, the fourth
> > should come from the line above. I added parenthesis around the
> > string addition to fix the precedence problem.
>
> Aha. That explains. Now I understand why the fix fixes it as well.
> I'll apply it ASAP. Thanks a lot!

A better fix might be to replace the + at the end of line 163 with .
This way the parser concatenates the strings and we don't introduce an
extra operation.


Thanks for all the hard work on gentoo-prefix.

Cheers,
Burcin
 

Thread Tools




All times are GMT. The time now is 08:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org