Re: Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it

2009-07-23 Thread Anderson Lizardo
On Thu, Jul 23, 2009 at 9:19 AM, Amit Sethi wrote:
> ok the problem is resolved ...
> I changed the /etc/resolv.conf file on scratchbox
> Now as far as I understand the file /scratchbox/etc/resolv.conf is the
> one reffered by python2.3 and wget as in my case it was always same as
> /etc/resolv.conf
>
> the scratchbox file /etc/resolv.conf is linked to the file
> /scratchbox/users/[username]/targets/FREMANTLE_X86/etc/resolv.conf ...
> this is the file that we need to change as far as I understand.
>
>
> but question though why should they be reffering to different
> files(python2.5 and 2.3)??
>

See my previous post. Your target is probably mis-configured,
/etc/resolv.conf is NEVER used AFAIK.

This can be confirmed by running this command inside scratchbox X86 target:

strace -e open -f wget -q -O /dev/null www.google.com 2>&1  | grep resolv.conf

here it returns:

open("/scratchbox/etc/resolv.conf", O_RDONLY) = 4

> +1, I also think python2.5 should be made  standard

Even if sbox moved to python2.5, you would still need to use PyMaemo's
python if you plan to make sure your application work on the tablets,
because Scrathbox's python is supposed to be used only for internal
sbox tools and only sees the modules/extensions from
/scratchbox/tools/lib/python2.3

So pybluez/pygtk/etc. would not work.

Regards,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it

2009-07-23 Thread Anderson Lizardo
On Thu, Jul 23, 2009 at 9:13 AM, Valerio Valerio wrote:
> Works now, but I had to edit again '/etc/resolv.conf' inside SB, copying the
> file as described by Anderson didn't worked.
>
> Thanks for the help.

If you did a manual installation (i.e. not using the SDK installer
script) or reseted your target, make sure you did run:

SBOX> sb-conf in -edFL

as instructed in:

http://maemo.org/development/sdks/maemo_5_beta_2_sdk_installation/#manualinstall

It garantees that /scratchbox/etc/resolv.conf is always used, and
/etc/resolv.conf (inside scratchbox) is ignored. Here I tested putting
my sbox target's /etc/resolv.conf as:

nameserver 1.2.3.4

(that is , with a bogus IP) and name resolution still worked , because
my /scratchbox/etc/resolv.conf is correct.

>
> P.S -> when will get python2.5 as default in the SB ? :)

I hope not during freamantle life cycle :) It would conflict with
PyMaemo in "interesting" ways.

Regards,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it

2009-07-23 Thread Amit Sethi
ok the problem is resolved ...
I changed the /etc/resolv.conf file on scratchbox
Now as far as I understand the file /scratchbox/etc/resolv.conf is the
one reffered by python2.3 and wget as in my case it was always same as
/etc/resolv.conf

the scratchbox file /etc/resolv.conf is linked to the file
/scratchbox/users/[username]/targets/FREMANTLE_X86/etc/resolv.conf ...
this is the file that we need to change as far as I understand.


but question though why should they be reffering to different
files(python2.5 and 2.3)??

+1, I also think python2.5 should be made  standard
-- 
A-M-I-T S|S
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it

2009-07-23 Thread Valerio Valerio
Hello,

On Thu, Jul 23, 2009 at 2:02 PM, daniel wilms wrote:

> > test case works for me with both python versions > and both targets. So
> it is not an issue
>
> sorry for the spam and the confusion. not in both targets (just X86!!) but
> in both SDKs (Fremantle and Diablo).


Works now, but I had to edit again '/etc/resolv.conf' inside SB, copying the
file as described by Anderson didn't worked.

Thanks for the help.

P.S -> when will get python2.5 as default in the SB ? :)

Best regards,

-- 
Valério Valério

http://www.valeriovalerio.org


>
> Cheers Daniel
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it

2009-07-23 Thread Anderson Lizardo
On Thu, Jul 23, 2009 at 8:30 AM, Amit Sethi wrote:
> I do not think this problem is a straight forward resolv.conf problem
> . In that scenario I should be getting the error in all services . I
> have checked other services like wget . It even works in case of
> python2.3... and thats what makes it so wierd 

python2.3 works because it is the native python that comes with
scratchbox itself (so it uses whatever configuration your host system
has, AFAIK).

Please try Daniel's suggestion first. Outside scratchbox:

# sudo cp /etc/resolv.conf /scratchbox/etc/resolv.conf

and see if it works.

Also make sure you are running your examples on Scratchbox X86 target.
Running Python applications on Scratchbox ARMEL is not supported.

Regards,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it

2009-07-23 Thread Valerio Valerio
Hello

On Thu, Jul 23, 2009 at 1:30 PM, Amit Sethi wrote:

> I do not think this problem is a straight forward resolv.conf problem
> . In that scenario I should be getting the error in all services . I
> have checked other services like wget . It even works in case of
> python2.3... and thats what makes it so wierd 


I've the same problem with python2.5 in scratchbox (diablo and fremantle),
however it works in the device, so this may be some strange scratchbox issue
:( .

Best,

 --
Valério Valério

http://www.valeriovalerio.org

>
>
>
>
> --
> A-M-I-T S|S
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it

2009-07-23 Thread Amit Sethi
I do not think this problem is a straight forward resolv.conf problem
. In that scenario I should be getting the error in all services . I
have checked other services like wget . It even works in case of
python2.3... and thats what makes it so wierd 



-- 
A-M-I-T S|S
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers