Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
All my portage commands is invalid!!! Help!!!!!!!!!!!!!!!!!!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Kingo
n00b
n00b


Joined: 30 Nov 2002
Posts: 7

PostPosted: Fri Apr 18, 2003 12:32 pm    Post subject: All my portage commands is invalid!!! Help!!!!!!!!!!!!!!!!!! Reply with quote

The power is suddenly off as I was using emerge command.
When I rebooted the system, ALL Portage commands can not be used.
When I use portage command such as emerge or etc-update, it tells me that:


Traceback (most recent call last):
File "/usr/bin/emerge", line 6, in ?
import os,sys,portage,emergehelp,xpak,string,re,commands,time,threading,shutil,traceback
File "/usr/lib/python2.2/site-packages/portage.py", line 4359, in ?
settings=config()
File "/usr/lib/python2.2/site-packages/portage.py", line 807, in __init__
self.mygcfg=getconfig("/etc/make.conf")
File "/usr/lib/python2.2/site-packages/portage.py", line 605, in getconfig
val=lex.get_token()
File "/usr/lib/python2.2/shlex.py", line 74, in get_token
raw = self.read_token()
File "/usr/lib/python2.2/shlex.py", line 144, in read_token
raise ValueError, "No closing quotation"
ValueError: No closing quotation


How should I fix it without re-installing Gentoo Linux?
Thanks a lot!!!
Back to top
View user's profile Send private message
metacove
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2003
Posts: 148

PostPosted: Fri Apr 18, 2003 2:20 pm    Post subject: Reply with quote

"All my portage are belong to invalid!"

On a more serious note, you might try removing the portage tree and doing an emerge sync again.
Back to top
View user's profile Send private message
red_over_blue
Guru
Guru


Joined: 16 Dec 2002
Posts: 310

PostPosted: Fri Apr 18, 2003 2:57 pm    Post subject: Reply with quote

I'm no guru but it looks more serious than that. From those error messages, it looks like the portage python script has been corrupted.

I don't know if this will help, but you could examine the file /usr/bin/emerge (it's just text) and see if it looks messed.

If so, and you tell me where the damn attach file button is :D I will attach my emerge file and you can replace yours with it. Hopefully that will get things going, and then I would emerge portage again.
Back to top
View user's profile Send private message
red_over_blue
Guru
Guru


Joined: 16 Dec 2002
Posts: 310

PostPosted: Fri Apr 18, 2003 3:00 pm    Post subject: Reply with quote

Or give me your email address and I will email it to you.
Back to top
View user's profile Send private message
Sarah
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2003
Posts: 82

PostPosted: Fri Apr 18, 2003 4:37 pm    Post subject: Re: All my portage commands is invalid!!! Help!!!!!!!!!!!!!! Reply with quote

Kingo wrote:
The power is suddenly off as I was using emerge command.
When I rebooted the system, ALL Portage commands can not be used.
When I use portage command such as emerge or etc-update, it tells me that:

[snip]

File "/usr/lib/python2.2/shlex.py", line 144, in read_token
raise ValueError, "No closing quotation"
ValueError: No closing quotation


Looks like one of the Python scripts is corrupted like red_over_blue suggests. Check out the README.RESCUE file in your /usr/portage/sys-apps/portage/files directory. Maybe by following those instructions, you can get the Python scripts restored.
_________________
Probably the last sound heard before the Universe folded up like a paper hat would be someone saying, "What happens if I do this?" - Terry Pratchett, Interesting Times
Back to top
View user's profile Send private message
Sarah
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2003
Posts: 82

PostPosted: Fri Apr 18, 2003 4:59 pm    Post subject: Reply with quote

I did a little more poking around that portage rescue stuff and I don't see the file that was corrupted for you so it looks like Python itself is messed up :( . You could try to untar the Python files if you have a tarball of Python in your /usr/portage/distfiles directory. Make sure it's the same version as the one you already had installed. Otherwise, take up red_over_blue's offer of getting the file emailed to you. Hopefully, the other Python files are ok. My copy of shlex.py is 209 lines long so I am resistant to just spamming the board with it.

[edit]
I'll add to these instructions to untar the Python into a temporary directory and copy the shlex.py file from it to the proper place in the /usr/lib/python2.2 directory.
[/edit]
_________________
Probably the last sound heard before the Universe folded up like a paper hat would be someone saying, "What happens if I do this?" - Terry Pratchett, Interesting Times
Back to top
View user's profile Send private message
Kingo
n00b
n00b


Joined: 30 Nov 2002
Posts: 7

PostPosted: Sat Apr 19, 2003 4:19 am    Post subject: Reply with quote

Thanks for everybody's help, specially sarah!!!!

I just accorded to the file README.RESCUE, and untar the portage-***.bz2. and then I can use the portage commands.

Thanks again.
Back to top
View user's profile Send private message
DeadMonkey
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jul 2002
Posts: 81
Location: Sitting in a Chair

PostPosted: Tue May 13, 2003 2:05 am    Post subject: Reply with quote

A big thanks once again for those, unlike me, who have a clue! :oops:

So far everything is working out.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum