Re: [gentoo-user] how to recover a portage that wasn't in use for very long time

2009-05-12 Thread Alexey Luchko

Nick Fortino wrote:

Alexey Luchko wrote:
I have a gentoo installed, but I wasn't updating it since late 2007, I 
suppose.

Today I've run emerge --sync. It worked! It's great ;)

But then I've got the following collision. Obviously, a portage update 
is required. But it is confused by dependencies:

colinux ~ # emerge portage --pretend --tree
These are the packages that would be merged, in reverse order:
[cut]
[blocks B ] sys-apps/portage-2.1.5 (is blocking 
app-shells/bash-3.2_p39)

colinux ~ #

I worked on this a couple months back to make it possible. The key is to 
download binary packages of portage and a few dependencies to break the 
block. Once portage is upgraded, it's smart enough to figure things out 
now. An original script an discussion can be found at 
http://blog.jolexa.net/2009/03/25/gentoo-tips-to-upgrade-your-really-old-installation/ 

A slightly modified version is here inline. I would recommend against 
running it as a script, but rather do the steps individually (also, if 
you aren't running amd64, be sure to change the architecture of the 
binaries you are downloading).


Read this line as typical warnings of your mileage may very etc.


I decided to try this way first.

I've got a problem on the way and hopefully restored the system.
The problem appeared after downloading and extracting new bash:
wget 
http://tinderbox.dev.gentoo.org/default-linux/x86/app-shells/bash-3.2_p39.tbz2

tar xfpj root/All/bash-3.2_p39.tbz2

Every next execution of bash (and sh also) gave me:
colinux ~ # sh
sh: /lib/libc.so.6: version `GLIBC_2.4' not found (required by sh)

I didn't get through it, but rather restored the partition from backup.
By the way, does one know a windows tool, that can write a partition directly?

If one is interested, I managed to get this way:
I had the backup on the windows host system.
I replaced my root's shell with /usr/bin/python and wrote a script that did 
what cat  /dev/cobd/4 would do if it was available.

The I restored the system running the following:
$ gzip -d  /z/inst/colinux/colinux20090512.img.gz | ssh r...@colinux -C 
'execfile(cat.py); cat(/dev/cobd/4)'


It's really funny, but writing these lines I've understand that I had mounted 
host file system, and I could have restored the backup through it.



Have a nice time ;)
Alexey.



Re: [gentoo-user] how to recover a portage that wasn't in use for very long time

2009-05-10 Thread Stroller


On 10 May 2009, at 01:58, Alexey Luchko wrote:

...
But then I've got the following collision. Obviously, a portage  
update is required. But it is confused by dependencies:

colinux ~ # emerge portage --pretend --tree

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[nomerge  ] sys-apps/portage-2.1.6.11 [2.1.2.2]
[ebuild U ]  app-shells/bash-3.2_p39 [3.1_p17] USE=-examples% - 
plugins%

[ebuild U ] sys-apps/portage-2.1.6.11 [2.1.2.2]
[ebuild U ]  dev-python/pycrypto-2.0.1-r6 [2.0.1-r5]
[ebuild U ]  sys-apps/sandbox-1.6-r2 [1.2.17]
[ebuild  N]   app-arch/lzma-utils-4.32.7  USE=-nocxx
[ebuild  N]  app-admin/eselect-news-20080320
[ebuild U ]   app-admin/eselect-1.0.11-r1 [1.0.7] USE=-vim- 
syntax%

[ebuild U ]  app-misc/pax-utils-0.1.19 [0.1.15]
[blocks B ] sys-apps/portage-2.1.5 (is blocking app-shells/ 
bash-3.2_p39)

colinux ~ #


Hi there,

I have done some similar kinds of updates. Once stuff has been removed  
from the tree it becomes a bit painful. I have had success, however,  
reading the blocked ebuilds to find which versions of dependency  
ebuilds are required, and then getting them from Gentoo's CVS attic http://sources.gentoo.org/ 
. You can place these in your local overlay and then `emerge  
=category/package-version` to overcome the blocker.


This is probably a fair bit of work - one machine here is so old that  
I accept I'll never get it updated (and a reinstall will be required,  
when I get around to it), on another the work is not complete. On that  
latter machine I have successfully updated some important packages to  
the latest version (previously updated September 2007) by using this  
method, but it required at least 2 or 3 blockers manually resolved  
this way, and it did feel ugly. I suggest frequent use of `revdep- 
rebuild`, `python-updater` and whatever else you can think of.


`emerge -pv --update world` on that machine still shows 202 packages  
in need of updating, so this will need repeating a number of times.


I think a number of people here would tell you that this isn't  
worthwhile, to back up /home directories  config files and to  
reinstall, but personally I'm reluctant to do that in the case of a  
working system on which users depend. So it _does_ appear possible to  
upgrade using this tedious method.


In your case, I think you would first try to emerge =sys-apps/ 
portage-2.1.5, in order to unblock app-shells/bash-3.2_p39. This will  
(surely) result in another blocker - resolve that first, then emerge  
=sys-apps/portage-2.1.5 then try again to upgrade to the latest portage.


Good luck!

Stroller.






Re: [gentoo-user] how to recover a portage that wasn't in use for very long time

2009-05-10 Thread Alan McKinnon
On Sunday 10 May 2009 02:58:41 Alexey Luchko wrote:
 Hi!

 I have a gentoo installed, but I wasn't updating it since late 2007, I
 suppose.
 Today I've run emerge --sync. It worked! It's great ;)

 But then I've got the following collision. Obviously, a portage update
 is required. But it is confused by dependencies:
 colinux ~ # emerge portage --pretend --tree

 These are the packages that would be merged, in reverse order:

 Calculating dependencies... done!
 [nomerge  ] sys-apps/portage-2.1.6.11 [2.1.2.2]
 [ebuild U ]  app-shells/bash-3.2_p39 [3.1_p17] USE=-examples% -
 plugins%
 [ebuild U ] sys-apps/portage-2.1.6.11 [2.1.2.2]
 [ebuild U ]  dev-python/pycrypto-2.0.1-r6 [2.0.1-r5]
 [ebuild U ]  sys-apps/sandbox-1.6-r2 [1.2.17]
 [ebuild  N]   app-arch/lzma-utils-4.32.7  USE=-nocxx
 [ebuild  N]  app-admin/eselect-news-20080320
 [ebuild U ]   app-admin/eselect-1.0.11-r1 [1.0.7] USE=-vim-syntax%
 [ebuild U ]  app-misc/pax-utils-0.1.19 [0.1.15]
 [blocks B ] sys-apps/portage-2.1.5 (is blocking app-shells/
 bash-3.2_p39)
 colinux ~ #

Once you sort that out, there's a whole host of other stuff to fix as well - 
expat, latest xorg and many more - all stuff that everyone else fixed a while 
ago and since forgot.

If you've never done this before, it's a good learning experience to do it 
(but only once). Thereafter, just reinstall - the pain of upgrading after 18 
months just isn't worth it

-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] how to recover a portage that wasn't in use for very long time

2009-05-10 Thread Nick Fortino

Alexey Luchko wrote:

Hi!

I have a gentoo installed, but I wasn't updating it since late 2007, I 
suppose.

Today I've run emerge --sync. It worked! It's great ;)

But then I've got the following collision. Obviously, a portage update 
is required. But it is confused by dependencies:

colinux ~ # emerge portage --pretend --tree

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[nomerge  ] sys-apps/portage-2.1.6.11 [2.1.2.2]
[ebuild U ]  app-shells/bash-3.2_p39 [3.1_p17] USE=-examples% 
-plugins%

[ebuild U ] sys-apps/portage-2.1.6.11 [2.1.2.2]
[ebuild U ]  dev-python/pycrypto-2.0.1-r6 [2.0.1-r5]
[ebuild U ]  sys-apps/sandbox-1.6-r2 [1.2.17]
[ebuild  N]   app-arch/lzma-utils-4.32.7  USE=-nocxx
[ebuild  N]  app-admin/eselect-news-20080320
[ebuild U ]   app-admin/eselect-1.0.11-r1 [1.0.7] USE=-vim-syntax%
[ebuild U ]  app-misc/pax-utils-0.1.19 [0.1.15]
[blocks B ] sys-apps/portage-2.1.5 (is blocking 
app-shells/bash-3.2_p39)

colinux ~ #


How to get it out?


Regards,
Alexey.




I worked on this a couple months back to make it possible. The key is to 
download binary packages of portage and a few dependencies to break the 
block. Once portage is upgraded, it's smart enough to figure things out 
now. An original script an discussion can be found at 
http://blog.jolexa.net/2009/03/25/gentoo-tips-to-upgrade-your-really-old-installation/


A slightly modified version is here inline. I would recommend against 
running it as a script, but rather do the steps individually (also, if 
you aren't running amd64, be sure to change the architecture of the 
binaries you are downloading).


Read this line as typical warnings of your mileage may very etc.

Nick
#Version 0.2, written by Nick Fortino 
#April 03, 2009
#This is known to work on systems younger than 2006.1, and suspected to fail
#on anything older due to glibc-2.4 incompatibility.

#This is an experimental guide on how to upgrade an old system to get to
#portage 2.1.6.7. Once this state is achieved, portage can do the rest, with
#decent dependency resolution. 

###
#Between the first tar command and the success of 'emerge -K ...', the
#true state of the system, and the state according to portage are different.
#This is rather unsafe, so be sure you understand what you are doing.
#Consider this your big red warning to backup important files before attempting
#an update, and consider a re-install if possible.
###

#It may be wise to use the default make.conf, as we would like to rebuild
#as few packages as possible before the toolchain has been updated, and use
#flags will bring in a bunch of dependencies.

#Update the symlink to an existing profile
unlink /etc/make.profile
ln -s ../usr/portage/profiles/default/linux/amd64/2008.0 /etc/make.profile

#Fetch and forcefully upgrade python, bash, and portage with prebuilt sources
#The naming of the directory All is important, as we are going to use /root
#as binary package source later on
mkdir All
cd All
wget 
http://tinderbox.dev.gentoo.org/default-linux/amd64/dev-lang/python-2.5.2-r7.tbz2
wget 
http://tinderbox.dev.gentoo.org/default-linux/amd64/app-shells/bash-3.2_p39.tbz2
wget 
http://tinderbox.dev.gentoo.org/default-linux/amd64/sys-apps/portage-2.1.6.7.tbz2
cd /
tar xfpj root/All/python-2.5.2-r7.tbz2
tar xfpj root/All/bash-3.2_p39.tbz2
tar xfpj root/All/portage-2.1.6.7.tbz2

#emerge these packages, so that portage is informed as to what is going on
PKGDIR=/root emerge -K --nodeps python bash portage

#See what will be upgraded, there should be no unresolved blockers
emerge -puDNv system

#Unfortunately, on anything except a stage3 only build, there could be
#This is due to the fact that we aren't updating all of world
#Run emerge -pvuDN world, if that has no blockers, there is a 
#rather simple solution. If that has blockers, your on your own.
#Read the text of the blockers, figure out which additional packages 
#need upgrading to make everything work, and append them to the command. 
#An example:
#emerge -pvuDN system hal mit-krb5

#Perform the update, this command will likely make good progress, and then fail
emerge -auDN system


#Known failures and solutions


#Python updater and python split, creating a confilct, resolve by removing
#the old file
rm /usr/sbin/python-updater
emerge -a1 python-updater
emerge -a1 python
#Cracklib is  wants -unmerge-orphans
FEATURES='-unmerge-orphans' emerge -a1 cracklib
#continue the upgrade
emerge -auDN system



#Cleanup


#Update the current terminal
env-update
source /etc/profile
#Deal with the many /etc files which need updating
emerge gentoolkit
dispatch-conf

#At this point, the toolchain has been rebuilt, which likely involved an upgrade
#of gcc. Follow 

[gentoo-user] how to recover a portage that wasn't in use for very long time

2009-05-09 Thread Alexey Luchko

Hi!

I have a gentoo installed, but I wasn't updating it since late 2007, I  
suppose.

Today I've run emerge --sync. It worked! It's great ;)

But then I've got the following collision. Obviously, a portage update  
is required. But it is confused by dependencies:

colinux ~ # emerge portage --pretend --tree

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[nomerge  ] sys-apps/portage-2.1.6.11 [2.1.2.2]
[ebuild U ]  app-shells/bash-3.2_p39 [3.1_p17] USE=-examples% - 
plugins%

[ebuild U ] sys-apps/portage-2.1.6.11 [2.1.2.2]
[ebuild U ]  dev-python/pycrypto-2.0.1-r6 [2.0.1-r5]
[ebuild U ]  sys-apps/sandbox-1.6-r2 [1.2.17]
[ebuild  N]   app-arch/lzma-utils-4.32.7  USE=-nocxx
[ebuild  N]  app-admin/eselect-news-20080320
[ebuild U ]   app-admin/eselect-1.0.11-r1 [1.0.7] USE=-vim-syntax%
[ebuild U ]  app-misc/pax-utils-0.1.19 [0.1.15]
[blocks B ] sys-apps/portage-2.1.5 (is blocking app-shells/ 
bash-3.2_p39)

colinux ~ #


How to get it out?


Regards,
Alexey.






Re: [gentoo-user] how to recover a portage that wasn't in use for very long time

2009-05-09 Thread Mike Kazantsev
On Sun, 10 May 2009 03:58:41 +0300
Alexey Luchko luc...@gmail.com wrote:

 But then I've got the following collision. Obviously, a portage update  
 is required. But it is confused by dependencies:
 colinux ~ # emerge portage --pretend --tree
 
 These are the packages that would be merged, in reverse order:
 
 Calculating dependencies... done!
 [nomerge  ] sys-apps/portage-2.1.6.11 [2.1.2.2]
 [ebuild U ]  app-shells/bash-3.2_p39 [3.1_p17] USE=-examples% - 
 plugins%
 [ebuild U ] sys-apps/portage-2.1.6.11 [2.1.2.2]
 [ebuild U ]  dev-python/pycrypto-2.0.1-r6 [2.0.1-r5]
 [ebuild U ]  sys-apps/sandbox-1.6-r2 [1.2.17]
 [ebuild  N]   app-arch/lzma-utils-4.32.7  USE=-nocxx
 [ebuild  N]  app-admin/eselect-news-20080320
 [ebuild U ]   app-admin/eselect-1.0.11-r1 [1.0.7] USE=-vim-syntax%
 [ebuild U ]  app-misc/pax-utils-0.1.19 [0.1.15]
 [blocks B ] sys-apps/portage-2.1.5 (is blocking app-shells/ 
 bash-3.2_p39)
 colinux ~ #
 
 
 How to get it out?

Try masking newer bash which blocks older portage, unmasking it after
the newer portage is in place.

If you have app-portage/gentoolkit installed, you can find out which
specific versions of bash it depends on using the following command:

  equery depgraph --depth 1 portage | grep bash

Otherwise you can use portage --tree or just look for DEPEND and
RDEPEND vars in the ebuild itself, which can be found in /var/db/pkg.

-- 
Mike Kazantsev // fraggod.net


signature.asc
Description: PGP signature


Re: [gentoo-user] how to recover a portage that wasn't in use for very long time

2009-05-09 Thread Mike Kazantsev
On Sun, 10 May 2009 07:54:34 +0600
Mike Kazantsev mike_kazant...@fraggod.net wrote:

 Otherwise you can use portage --tree or just look for DEPEND and
 RDEPEND vars in the ebuild itself, which can be found in /var/db/pkg.

I mean emerge --tree, of course ;)

-- 
Mike Kazantsev // fraggod.net


signature.asc
Description: PGP signature