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 User

 
 
LinkBack Thread Tools
 
Old 11-12-2010, 12:56 PM
Helmut Jarausch
 
Default import site fails - why

Hi,

I have cloned the root fs and /usr onto a new machine (as I have done
many times before)

I boot SystemRescueCD and mount the new root on, say, /nroot
Then my standard procedure is as follows

mount -o bind /proc /nroot/proc
mount -o bind /dev /nroot/proc

chroot /nroot /bin/bash

cp /proc/mounts /etc/mtab
mount /usr

env-update

and finally

source /etc/profile

BUT, this time, env-update fails because it cannot
import site

the error being

TypeError stat() argument 1 must be an encoded string without NULL
bytes.

Has anybody an explanation for this failure?

(the system is bleeding edge ~amd64, eselected python-2.6
(python-2.6.6-r1)

Many thanks for a hint,
Helmut.
 
Old 11-12-2010, 01:24 PM
Fatih Tümen
 
Default import site fails - why

On Fri, Nov 12, 2010 at 15:56, Helmut Jarausch
<jarausch@igpm.rwth-aachen.de> wrote:
> mount -o bind /proc /nroot/proc
> mount -o bind /dev /nroot/proc

That looks a bit strange to me, doesnt it to you? I would retype
that as follow:

mount -t proc none /nroot/proc
mount -o bind /dev/ /nroot/dev

--
* *Fatih
 
Old 11-12-2010, 01:32 PM
Helmut Jarausch
 
Default import site fails - why

On 11/12/10 15:24:44, Fatih Tümen wrote:
> On Fri, Nov 12, 2010 at 15:56, Helmut Jarausch
> <jarausch@igpm.rwth-aachen.de> wrote:
> > mount -o bind /proc /nroot/proc
> > mount -o bind /dev /nroot/proc
>
> That looks a bit strange to me, doesnt it to you? I would retype
> that as follow:
>
> mount -t proc none /nroot/proc
> mount -o bind /dev/ /nroot/dev
>

Thanks Faith,

unfortunately this doesn't solve the problem.
(My version has been working for years, and
I can mount /usr in the chrooted system.)

Helmut.
 
Old 11-12-2010, 01:58 PM
Fatih Tümen
 
Default import site fails - why

On Fri, Nov 12, 2010 at 16:32, Helmut Jarausch
<jarausch@igpm.rwth-aachen.de> wrote:
> On 11/12/10 15:24:44, Fatih Tümen wrote:
>> On Fri, Nov 12, 2010 at 15:56, Helmut Jarausch
>> <jarausch@igpm.rwth-aachen.de> wrote:
>> > mount -o bind /proc /nroot/proc
>> > mount -o bind /dev /nroot/proc
>>
>> That looks a bit strange to me, doesnt it to you? I would retype
>> that as follow:
>>
>> mount -t proc none /nroot/proc
>> mount -o bind /dev/ /nroot/dev
>>
>
> Thanks Faith,
>
> unfortunately this doesn't solve the problem.
> (My version has been working for years, and
> I can mount /usr in the chrooted system.)
>
> Helmut.
>
>
>

Ok so I learn one more thing, thanks.

I think its better if you post the exact error message.

--
Fatih
 
Old 11-12-2010, 02:44 PM
Helmut Jarausch
 
Default import site fails - why

On 11/12/10 15:58:27, Fatih Tümen wrote:
> On Fri, Nov 12, 2010 at 16:32, Helmut Jarausch
> <jarausch@igpm.rwth-aachen.de> wrote:
> > On 11/12/10 15:24:44, Fatih Tümen wrote:
> >> On Fri, Nov 12, 2010 at 15:56, Helmut Jarausch
> >> <jarausch@igpm.rwth-aachen.de> wrote:
> >> > mount -o bind /proc /nroot/proc
> >> > mount -o bind /dev /nroot/proc
> >>
> >> That looks a bit strange to me, doesnt it to you? I would
> retype
> >> that as follow:
> >>
> >> mount -t proc none /nroot/proc
> >> mount -o bind /dev/ /nroot/dev
> >>
> >
> > Thanks Faith,
> >
> > unfortunately this doesn't solve the problem.
> > (My version has been working for years, and
> > I can mount /usr in the chrooted system.)
> >
> > Helmut.
> >
> >
> >
>
> Ok so I learn one more thing, thanks.
>
> I think its better if you post the exact error message.
>

Meanwhile, I have run python-updater on the master machine and I have
re-install portage.
Then I resync'ed the new machine against this master.

Still, env-update fails after chroot
Here is the output

Python 2.6.6 (r266:84292, Oct 13 2010, 09:06:24)
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib64/python2.6/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/lib64/python2.6/lib-
dynload/readline.so
>>> import site
# /usr/lib64/python2.6/site.pyc matches /usr/lib64/python2.6/site.py
import site # precompiled from /usr/lib64/python2.6/site.pyc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/site.py", line 526, in <module>
main()
File "/usr/lib64/python2.6/site.py", line 509, in main
known_paths = addsitepackages(known_paths)
File "/usr/lib64/python2.6/site.py", line 289, in addsitepackages
addsitedir(sitedir, known_paths)
File "/usr/lib64/python2.6/site.py", line 185, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib64/python2.6/site.py", line 159, in addpackage
if not dircase in known_paths and os.path.exists(dir):
File "/usr/lib64/python2.6/genericpath.py", line 18, in exists
st = os.stat(path)
TypeError: stat() argument 1 must be encoded string without NULL bytes,
not str
>>>

This is with portage-2.2.0-alpha4 which works flawlessly on the master
machine.

I'm puzzled!

Helmut.
 
Old 11-12-2010, 03:25 PM
Fatih Tümen
 
Default import site fails - why

On Fri, Nov 12, 2010 at 17:44, Helmut Jarausch
<jarausch@igpm.rwth-aachen.de> wrote:
> Meanwhile, I have run python-updater on the master machine and I have
> re-install portage.
> Then I resync'ed the new machine against this master.
>
> Still, env-update fails after chroot
> Here is the output
>
> Python 2.6.6 (r266:84292, Oct 13 2010, 09:06:24)
> [GCC 4.4.4] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> dlopen("/usr/lib64/python2.6/lib-dynload/readline.so", 2);
> import readline # dynamically loaded from /usr/lib64/python2.6/lib-
> dynload/readline.so
>>>> import site
> # /usr/lib64/python2.6/site.pyc matches /usr/lib64/python2.6/site.py
> import site # precompiled from /usr/lib64/python2.6/site.pyc
> Traceback (most recent call last):
> *File "<stdin>", line 1, in <module>
> *File "/usr/lib64/python2.6/site.py", line 526, in <module>
> * *main()
> *File "/usr/lib64/python2.6/site.py", line 509, in main
> * *known_paths = addsitepackages(known_paths)
> *File "/usr/lib64/python2.6/site.py", line 289, in addsitepackages
> * *addsitedir(sitedir, known_paths)
> *File "/usr/lib64/python2.6/site.py", line 185, in addsitedir
> * *addpackage(sitedir, name, known_paths)
> *File "/usr/lib64/python2.6/site.py", line 159, in addpackage
> * *if not dircase in known_paths and os.path.exists(dir):
> *File "/usr/lib64/python2.6/genericpath.py", line 18, in exists
> * *st = os.stat(path)
> TypeError: stat() argument 1 must be encoded string without NULL bytes,
> not str
>>>>
>
> This is with portage-2.2.0-alpha4 which works flawlessly on the master
> machine.
>
> I'm puzzled!

It looks like an encoding problem of some path but we wont know which
one unless you try to catch it with strace -e trace=open `which
env-update`. Otherwise I am puzzled as much as you are.
--
* *Fatih
 

Thread Tools




All times are GMT. The time now is 09:35 AM.

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