Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Fatih Tümen
On Fri, Oct 15, 2010 at 9:19 PM, Albert Hopkins  wrote:
> On Fri, 2010-10-15 at 19:55 +0300, Fatih Tümen wrote:
>> > This is a bug... shuld be more something like:
>> >
>> >                uris.append(syncuri.replace(
>> >                    "//%s%s%s/" % (user_name, hostname, port),
>> >                    "//%s%s%s/" % (user_name, ip, port), 1))
>> >
>> > Probably needs to be reported.
>> >
>> >
>> >
>> >
>>
>> Coding against PEP8 is not a bug.
>
> I was referring to the adding a string to an integer.
>
>
>

1 was the count argument of replace, the third one (not second) and
variables added together (concatenation) supposed to be string there.
I think you got the wrong impression because of the line wrapping;
traceback unfortunately prints the last (wrapped) line of the buggy
statement/expression. That line belongs to the following block:

for ip in ips:
uris.append(syncuri.replace(
"//" + user_name + hostname + port + "/",
"//" + user_name + ip + port + "/", 1))

Seeing you changed the formatting style I thought your referring to
suggested string formating in pep. Sorry.

--
Fatih



Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Albert Hopkins
On Fri, 2010-10-15 at 19:55 +0300, Fatih Tümen wrote:
> > This is a bug... shuld be more something like:
> >
> >uris.append(syncuri.replace(
> >"//%s%s%s/" % (user_name, hostname, port),
> >"//%s%s%s/" % (user_name, ip, port), 1))
> >
> > Probably needs to be reported.
> >
> >
> >
> >
> 
> Coding against PEP8 is not a bug. 

I was referring to the adding a string to an integer.




Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Mark Knecht
2010/10/15 Fatih Tümen :
> On Fri, Oct 15, 2010 at 8:29 PM, Mark Knecht  wrote:
>>> Got it, you hit the bug 340899 and its already fixed, just apply the patch
>>> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c54c1af789b306a85e9d7e79fb54f02a05346616
>>>
>>> --
>>>    Fatih
>>>
>>>
>>
>> Thanks - I got the patch and that seems to have fixed eix-sync.
>>
>> Should anyone else run into this I did the following:
>>
>> Right click and save the patch file on the link provided by Fatih
>>
>> cd /usr/lib64/portage
>> patch -p1 --dry-run > patch -p1 >
>> and then things started working again.
>>
>> Note that when I finished the sync and emerged the newer version of
>> portage I got messages I had not seen before about colliding with a
>> couple of files. Those collisions were the files modified by the
>> patch.
>>
>> Many thanks Fatih!
>>
>> Cheers,
>> Mark
>>
>
> Yw. Thanks for posting step-by-step solution for others' future reference.
>

And also for you or others to double check in case I wasn't doing it
correctly. I wasn't sure where the portage executable was actually
kept so I wasn't sure if I was patching the right thing. It was
however the only place on my machine with the apparently correct patch
that matched the first few lines in the patch file.

Again, thanks!



Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Fatih Tümen
On Fri, Oct 15, 2010 at 8:29 PM, Mark Knecht  wrote:
>> Got it, you hit the bug 340899 and its already fixed, just apply the patch
>> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c54c1af789b306a85e9d7e79fb54f02a05346616
>>
>> --
>>    Fatih
>>
>>
>
> Thanks - I got the patch and that seems to have fixed eix-sync.
>
> Should anyone else run into this I did the following:
>
> Right click and save the patch file on the link provided by Fatih
>
> cd /usr/lib64/portage
> patch -p1 --dry-run  patch -p1 
> and then things started working again.
>
> Note that when I finished the sync and emerged the newer version of
> portage I got messages I had not seen before about colliding with a
> couple of files. Those collisions were the files modified by the
> patch.
>
> Many thanks Fatih!
>
> Cheers,
> Mark
>

Yw. Thanks for posting step-by-step solution for others' future reference.

--
   Fatih



Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Mark Knecht
2010/10/15 Fatih Tümen :
> On Fri, Oct 15, 2010 at 6:58 PM, Mark Knecht  wrote:
>> 2010/10/15 Fatih Tümen :
>>> On Fri, Oct 15, 2010 at 5:35 PM, Mark Knecht  wrote:
 c2stable ~ # eix-sync
  * Running emerge --sync
 Traceback (most recent call last):
  File "/usr/bin/emerge", line 43, in 
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in emerge_main
    return action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in 
 action_sync
    "//" + user_name + ip + port + "/", 1))
 TypeError: cannot concatenate 'str' and 'int' objects
  * emerge --sync failed
  * Time statistics:
     4 seconds for syncing
     4 seconds total
 c2stable ~ # emerge --sync
 Traceback (most recent call last):
  File "/usr/bin/emerge", line 43, in 
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in
 emerge_main
    return action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in
 action_sync
    "//" + user_name + ip + port + "/", 1))
 TypeError: cannot concatenate 'str' and 'int' objects
 c2stable ~ # eselect python list
 Available Python interpreters:
  [1]   python2.6 *
  [2]   python3.1
 c2stable ~ #

>>>
>>> At first sight it seems to me that someone made a typo in there..  ip
>>> should be ips[0]
>>> Which specific version of portage and python are you using?
>>>
>>> --
>>>    Fatih
>>
>> Hi Fatih,
>>
>> It seems that the failure (so far) is only with syncing and not with
>> using the tools to look at the system. That's good.
>>
>> c2stable ~ # eix -Ic python
>> [I] app-admin/eselect-python (20100...@05/26/10): Eselect module for
>> management of multiple Python versions
>> [I] app-admin/python-updater (0...@05/18/10): Script used to remerge
>> python packages when changing Python version.
>> [I] dev-lang/python (2.6.5-r3(2.6)[...@10/12/10
>> 3.1.2-r4(3.1)@09/30/10): Python is an interpreted, interactive,
>> object-oriented programming language.
>> 
>>
>> Note that it seems the 2.6.5-r3 version is coming from the Pentoo
>> overlay if it makes a difference.
>>
>> c2stable ~ # eix -Ic portage
>> [I] app-portage/portage-utils (0@06/11/10): small and fast portage
>> helper tools written in C
>> [I] sys-apps/portage (2.2_r...@10/13/10): Portage is the package
>> management and distribution system for Gentoo
>> Found 2 matches.
>> c2stable ~ #
>>
>> As for syncing individually it's just an old-dog, new-trick thing.
>> I've done it this way for years and somehow never got in the swing of
>> doing anything else.
>>
>> Thanks for looking at the code. That's beyond my scope of expertise.
>>
>> - Mark
>>
>>
>
> Got it, you hit the bug 340899 and its already fixed, just apply the patch
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c54c1af789b306a85e9d7e79fb54f02a05346616
>
> --
>    Fatih
>
>

Thanks - I got the patch and that seems to have fixed eix-sync.

Should anyone else run into this I did the following:

Right click and save the patch file on the link provided by Fatih

cd /usr/lib64/portage
patch -p1 --dry-run 

Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Fatih Tümen
On Fri, Oct 15, 2010 at 7:27 PM, Albert Hopkins  wrote:
> On Fri, 2010-10-15 at 07:35 -0700, Mark Knecht wrote:
>>   File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in
>> action_sync
>>     "//" + user_name + ip + port + "/", 1))
>> TypeError: cannot concatenate 'str' and 'int' objects
>
> This is a bug... shuld be more something like:
>
>                uris.append(syncuri.replace(
>                    "//%s%s%s/" % (user_name, hostname, port),
>                    "//%s%s%s/" % (user_name, ip, port), 1))
>
> Probably needs to be reported.
>
>
>
>

Coding against PEP8 is not a bug. I guess devs find string
concatenation more handy and maintainable.

The bug was about the addrinfos data gotten from the server. I thought
the response of possibly down rsync server was not handled well, which
is why I offered to change rsync server, but the actual problem was
caused by assuming that IPv6 is supported on the machine.

--
Fatih



Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Albert Hopkins
On Fri, 2010-10-15 at 07:35 -0700, Mark Knecht wrote:
>   File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in
> action_sync
> "//" + user_name + ip + port + "/", 1))
> TypeError: cannot concatenate 'str' and 'int' objects 

This is a bug... shuld be more something like:

uris.append(syncuri.replace(
"//%s%s%s/" % (user_name, hostname, port),
"//%s%s%s/" % (user_name, ip, port), 1))

Probably needs to be reported.





Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Fatih Tümen
On Fri, Oct 15, 2010 at 6:58 PM, Mark Knecht  wrote:
> 2010/10/15 Fatih Tümen :
>> On Fri, Oct 15, 2010 at 5:35 PM, Mark Knecht  wrote:
>>> c2stable ~ # eix-sync
>>>  * Running emerge --sync
>>> Traceback (most recent call last):
>>>  File "/usr/bin/emerge", line 43, in 
>>>    retval = emerge_main()
>>>  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in emerge_main
>>>    return action_sync(settings, trees, mtimedb, myopts, myaction)
>>>  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in action_sync
>>>    "//" + user_name + ip + port + "/", 1))
>>> TypeError: cannot concatenate 'str' and 'int' objects
>>>  * emerge --sync failed
>>>  * Time statistics:
>>>     4 seconds for syncing
>>>     4 seconds total
>>> c2stable ~ # emerge --sync
>>> Traceback (most recent call last):
>>>  File "/usr/bin/emerge", line 43, in 
>>>    retval = emerge_main()
>>>  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in
>>> emerge_main
>>>    return action_sync(settings, trees, mtimedb, myopts, myaction)
>>>  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in
>>> action_sync
>>>    "//" + user_name + ip + port + "/", 1))
>>> TypeError: cannot concatenate 'str' and 'int' objects
>>> c2stable ~ # eselect python list
>>> Available Python interpreters:
>>>  [1]   python2.6 *
>>>  [2]   python3.1
>>> c2stable ~ #
>>>
>>
>> At first sight it seems to me that someone made a typo in there..  ip
>> should be ips[0]
>> Which specific version of portage and python are you using?
>>
>> --
>>    Fatih
>
> Hi Fatih,
>
> It seems that the failure (so far) is only with syncing and not with
> using the tools to look at the system. That's good.
>
> c2stable ~ # eix -Ic python
> [I] app-admin/eselect-python (20100...@05/26/10): Eselect module for
> management of multiple Python versions
> [I] app-admin/python-updater (0...@05/18/10): Script used to remerge
> python packages when changing Python version.
> [I] dev-lang/python (2.6.5-r3(2.6)[...@10/12/10
> 3.1.2-r4(3.1)@09/30/10): Python is an interpreted, interactive,
> object-oriented programming language.
> 
>
> Note that it seems the 2.6.5-r3 version is coming from the Pentoo
> overlay if it makes a difference.
>
> c2stable ~ # eix -Ic portage
> [I] app-portage/portage-utils (0@06/11/10): small and fast portage
> helper tools written in C
> [I] sys-apps/portage (2.2_r...@10/13/10): Portage is the package
> management and distribution system for Gentoo
> Found 2 matches.
> c2stable ~ #
>
> As for syncing individually it's just an old-dog, new-trick thing.
> I've done it this way for years and somehow never got in the swing of
> doing anything else.
>
> Thanks for looking at the code. That's beyond my scope of expertise.
>
> - Mark
>
>

Got it, you hit the bug 340899 and its already fixed, just apply the patch
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c54c1af789b306a85e9d7e79fb54f02a05346616

--
Fatih



Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Mark Knecht
2010/10/15 Fatih Tümen :
> On Fri, Oct 15, 2010 at 5:35 PM, Mark Knecht  wrote:
>> c2stable ~ # eix-sync
>>  * Running emerge --sync
>> Traceback (most recent call last):
>>  File "/usr/bin/emerge", line 43, in 
>>    retval = emerge_main()
>>  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in emerge_main
>>    return action_sync(settings, trees, mtimedb, myopts, myaction)
>>  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in action_sync
>>    "//" + user_name + ip + port + "/", 1))
>> TypeError: cannot concatenate 'str' and 'int' objects
>>  * emerge --sync failed
>>  * Time statistics:
>>     4 seconds for syncing
>>     4 seconds total
>> c2stable ~ # emerge --sync
>> Traceback (most recent call last):
>>  File "/usr/bin/emerge", line 43, in 
>>    retval = emerge_main()
>>  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in
>> emerge_main
>>    return action_sync(settings, trees, mtimedb, myopts, myaction)
>>  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in
>> action_sync
>>    "//" + user_name + ip + port + "/", 1))
>> TypeError: cannot concatenate 'str' and 'int' objects
>> c2stable ~ # eselect python list
>> Available Python interpreters:
>>  [1]   python2.6 *
>>  [2]   python3.1
>> c2stable ~ #
>>
>
> At first sight it seems to me that someone made a typo in there..  ip
> should be ips[0]
> Which specific version of portage and python are you using?
>
> --
>    Fatih

Hi Fatih,

It seems that the failure (so far) is only with syncing and not with
using the tools to look at the system. That's good.

c2stable ~ # eix -Ic python
[I] app-admin/eselect-python (20100...@05/26/10): Eselect module for
management of multiple Python versions
[I] app-admin/python-updater (0...@05/18/10): Script used to remerge
python packages when changing Python version.
[I] dev-lang/python (2.6.5-r3(2.6)[...@10/12/10
3.1.2-r4(3.1)@09/30/10): Python is an interpreted, interactive,
object-oriented programming language.


Note that it seems the 2.6.5-r3 version is coming from the Pentoo
overlay if it makes a difference.

c2stable ~ # eix -Ic portage
[I] app-portage/portage-utils (0@06/11/10): small and fast portage
helper tools written in C
[I] sys-apps/portage (2.2_r...@10/13/10): Portage is the package
management and distribution system for Gentoo
Found 2 matches.
c2stable ~ #

As for syncing individually it's just an old-dog, new-trick thing.
I've done it this way for years and somehow never got in the swing of
doing anything else.

Thanks for looking at the code. That's beyond my scope of expertise.

- Mark



Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Fatih Tümen
2010/10/15 Fatih Tümen :
> On Fri, Oct 15, 2010 at 5:35 PM, Mark Knecht  wrote:
>> c2stable ~ # eix-sync
>>  * Running emerge --sync
>> Traceback (most recent call last):
>>  File "/usr/bin/emerge", line 43, in 
>>    retval = emerge_main()
>>  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in emerge_main
>>    return action_sync(settings, trees, mtimedb, myopts, myaction)
>>  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in action_sync
>>    "//" + user_name + ip + port + "/", 1))
>> TypeError: cannot concatenate 'str' and 'int' objects
>>  * emerge --sync failed
>>  * Time statistics:
>>     4 seconds for syncing
>>     4 seconds total
>> c2stable ~ # emerge --sync
>> Traceback (most recent call last):
>>  File "/usr/bin/emerge", line 43, in 
>>    retval = emerge_main()
>>  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in
>> emerge_main
>>    return action_sync(settings, trees, mtimedb, myopts, myaction)
>>  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in
>> action_sync
>>    "//" + user_name + ip + port + "/", 1))
>> TypeError: cannot concatenate 'str' and 'int' objects
>> c2stable ~ # eselect python list
>> Available Python interpreters:
>>  [1]   python2.6 *
>>  [2]   python3.1
>> c2stable ~ #
>>
>
> At first sight it seems to me that someone made a typo in there..  ip
> should be ips[0]
> Which specific version of portage and python are you using?
>
> --
>    Fatih
>

I just checked the code to verify myself. I was wrong,  ip is the loop
variable of ips list I recalled which is being iterated over.

Rsync server maybe down or smth, Did you try with a differnt rsync server?

Btw, AFAIR eix-sync can sync overlays, why you sync them individually?

--
Fatih



Re: [gentoo-user] emerge/python failure

2010-10-15 Thread Fatih Tümen
On Fri, Oct 15, 2010 at 5:35 PM, Mark Knecht  wrote:
> c2stable ~ # eix-sync
>  * Running emerge --sync
> Traceback (most recent call last):
>  File "/usr/bin/emerge", line 43, in 
>    retval = emerge_main()
>  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in emerge_main
>    return action_sync(settings, trees, mtimedb, myopts, myaction)
>  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in action_sync
>    "//" + user_name + ip + port + "/", 1))
> TypeError: cannot concatenate 'str' and 'int' objects
>  * emerge --sync failed
>  * Time statistics:
>     4 seconds for syncing
>     4 seconds total
> c2stable ~ # emerge --sync
> Traceback (most recent call last):
>  File "/usr/bin/emerge", line 43, in 
>    retval = emerge_main()
>  File "/usr/lib64/portage/pym/_emerge/main.py", line 1604, in
> emerge_main
>    return action_sync(settings, trees, mtimedb, myopts, myaction)
>  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2134, in
> action_sync
>    "//" + user_name + ip + port + "/", 1))
> TypeError: cannot concatenate 'str' and 'int' objects
> c2stable ~ # eselect python list
> Available Python interpreters:
>  [1]   python2.6 *
>  [2]   python3.1
> c2stable ~ #
>

At first sight it seems to me that someone made a typo in there..  ip
should be ips[0]
Which specific version of portage and python are you using?

--
Fatih