Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Updating old system
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
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Sat Feb 25, 2017 5:01 am    Post subject: Updating old system Reply with quote

Hello!

I didn't update the system for more than a year. Am I right that the optimal way to update it is to load snapshots successively, starting from the closest to the last update, update system with him, and repeat that with more and more recent snapshots?

I mean optimal in the following way. The system is heavily used by me, so it would be great to have a working system at every update step. I'm a newbie in Gentoo, so I'd prefer a way with many simple steps to the one with a few hardcore ones. I'm in no hurry, in a way that I can live without the last update for a while.

Am I right that using the aforementioned strategy I would just have the system up to date to the time of a given snapshot? And as I would fight some update problems anyway, that way I would fight them more smooth?

And am I right that I need to use an old snapshot at least one time anyway because my profile (kde) changed to another one (plasma)?
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Sat Feb 25, 2017 6:03 am    Post subject: Re: Updating old system Reply with quote

vanger wrote:
Hello!
Hello and welcome to the Forum!
vanger wrote:
I didn't update the system for more than a year. Am I right that the optimal way to update it is to load snapshots successively, starting from the closest to the last update, update system with him, and repeat that with more and more recent snapshots?
Well, no. The optimal way is to start over from scratch. A year is going to be painful. But if you can accept the pain we may be able to help. Maybe, or you may have an unmanageable mess. Start with backups or you may get to keep the pieces. You can't do this incrementally or safely. You have been warned.

Updating a system this old is going to be a bit like eating an elephant. It is a big job and the key to success is to do it one plate at a time.

As you probably know there are several sets on your gentoo install. The two most useful used are @system and @world. @system is exactly what the name suggests: the basic system you get with a stage3. @world is all that plus everything you installed.

I recommend you proceed by first updating your @system set. Once you finish that you can move on to @world. After your @system update you will likely break most or all of your "non-essential" programs, like your X server. Before you proceed you should install wgetpaste so you can pastebin from the commandline to ask for help here if needed. We are fresh out of crystal balls :)

Here is the exact commands I would plan use in a non-X terminal with comments (denoted with #) as to why.
Code:
#Collect all the source code in case the internet breaks
emerge -e --fetchonly @system
# try to get the world ones too. If portage complains about packages you can use --exclude to get a partial list
emerge -e --fetchonly @world
#update system
emerge -e @system
#update config files. Be careful you don't mess up your edits!
dispatch-config
#alternately use etc-update or preferred tool
#try to update world
emerge -auvND @world
#if that fails (it will), try to update in pieces where <foo> and <bar> are things you can update
emerge -auvND xorg-server <foo> <bar>
#once everything is up to date remove the cruft
emerge -ac
This is a plan, anyway. You will have to be creative and read the portage output.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Sat Feb 25, 2017 8:57 am    Post subject: Re: Updating old system Reply with quote

Thank you a lot for your answer!

The Doctor wrote:
The optimal way is to start over from scratch. A year is going to be painful. But if you can accept the pain we may be able to help. Maybe, or you may have an unmanageable mess. Start with backups or you may get to keep the pieces. You can't do this incrementally or safely.

But why? I'm not arguing, but trying to understand. It seemed to me that the aforementioned strategy with a successive snapshots should prevent exactly the possibility of obtaining of an unmanageable mess: I'd just moving forward in time with a couple of months step, faced with the same problems as with usual monthly update, aren't I?

The Doctor wrote:

I recommend you proceed by first updating your @system set. Once you finish that you can move on to @world. After your @system update you will likely break most or all of your "non-essential" programs, like your X server.

That scares me :) As I said, the system is actively used now, so it would be bad to unable to use it for a several days if something would go wrong (I remember how I installed Gentoo for a first time :))

The Doctor wrote:

Here is the exact commands I would plan use in a non-X terminal with comments (denoted with #) as to why. [code]#Collect all the source code in case the internet breaks
emerge -e --fetchonly @system

But anyway I must use some old snapshot to be able to do this (like it said here: https://wiki.gentoo.org/wiki/Upgrading_Gentoo#Upgrading_from_older_systems), aren't I?

Quote:
root@localhost /home/vanger % emerge -ae --fetchonly @system

!!! /etc/portage/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /usr/portage/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)

!!! Your current profile is invalid. If you have just changed your profile
!!! configuration, you should revert back to the previous configuration.
!!! Allowed actions are limited to --help, --info, --search, --sync, and
!!! --version.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54239
Location: 56N 3W

PostPosted: Sat Feb 25, 2017 9:42 am    Post subject: Reply with quote

vanger,

I would opt for something half way between your incremental approach, which will be required for some packages and The Doctors, its faster to do a new install.
Yes, its faster to do a new install but you can update if you are determined enough.

You can get any portage snapshot you want over the past year. The problem will be the source tarballs which may no longer be on the Gentoo mirrors.
You will need to hunt them down.

I would go for broke, @system then @world and pick up the pieces as you go.

The fallback is Fix My Gentoo which allows you to build and install binary packages to fix almost any broken Gentoo install.

I would start with
Code:
emerge --sync
emerge wgetpaste
/usr/portage/scripts/bootstrap.sh
gcc-config <choose_new_gcc>
USE=-X emerge -uDNav --with-bdeps=y --backtrack=50 --keep-going @system

and see what happens.
You may need binary versions of python and portage to get started.

/usr/portage/scripts/bootstrap.sh is the stage1 of a stage1 install. It builds your toolchain.
I seem to remember that it does not support resume, so don't interrupt it.

The USE=-X prevents a lot of Xorg packages being dragged in but Xorg may be broken an a result.
You may need to use --exclude="space separated list of category/atoms to ignore" to that emerge command too.

All in all it will be a wonderful educational experience.

Homework. Read that wiki link. Its your get out of jail free card.
Read about all those emerge options before you actually need them.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Sat Feb 25, 2017 5:44 pm    Post subject: Reply with quote

Just my $0.02, a year isn't too bad, you should do a sync and emerge --pretend ... see how bad it really is, post the output, it may not really be that bad. A lot of the problems have indeed been run into by others and might have simple solutions.

I have way too many installs to update, one of which is on a USB stick that I constantly forget to update (plus the fact that it's flash, and don't want to update it too often in fear of flash wearout which would mean a reinstall.) That flash stick still seems to update fine after quite some time.

There are clearly some points within the continuum that have serious implications that make it hard to update. I think one of them happened recently but it was not nearly as tough as ones in the past (the "perl" problem that isn't really a "perl" problem) and depending on what packages you were using, it could go either way.

I would not go through snapshots of portage, that's way too much work overall. Do it in one big chunk or reinstall from scratch.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Sat Feb 25, 2017 6:30 pm    Post subject: Reply with quote

As the OP is using KDE, he is probably in for a really rocky ride after not updating his installation for more than a year.

A couple of days ago I finished updating the ~amd64 installation on my old Compal NBLB2 laptop (first-generation Core i7), which I had not touched for just over a couple of months. It took three days to update, including sorting out all the blockers and merging the latest version of KDE Plasma/Frameworks/Apps. Qt4, Qt5, icu, phonon, KDE4 and a few other things caused a lot of hassle. Anyway, the installation is bang up to date now. It's my fault for not updating it regularly. KDE can be a real swine to update if you leave it too long.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Sat Feb 25, 2017 6:36 pm    Post subject: Reply with quote

Not much to do with KDE software; it all depends on how well you have treated your system going into the big upgrade, e.g. how much cruft there is lingering for lack of running --depclean, how polluted your world file is with libraries not applications. Myself updating a legacy Plasma-4 system right now and portage properly auto-resolved 55 blockers, going well at === (143 of 265) currently.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Sat Feb 25, 2017 6:56 pm    Post subject: Reply with quote

asturm wrote:
Not much to do with KDE software; it all depends on how well you have treated your system going into the big upgrade, e.g. how much cruft there is lingering for lack of running --depclean, how polluted your world file is with libraries not applications. Myself updating a legacy Plasma-4 system right now and portage properly auto-resolved 55 blockers, going well at === (143 of 265) currently.

Good for you. I always run --depclean after updating world, and the ~amd64 installation was fine when I last touched it at the beginning of December last year. And my world file was not 'polluted' either. The update in my case was 684 packages, so a few more than your 265, but then I have a lot of applications installed for work purposes. kdelibs also caused some trouble, but the main hassle was Qt. Qt may not be KDE, but KDE depends on Qt, and Qt certainly was a pain to update.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Sat Feb 25, 2017 7:03 pm    Post subject: Reply with quote

There's a trick for when an upgrade does not add all of Qt to the depgraph (that can only happen when one of the Qt deps is left behind, because some of the revdep(s) got rid of it in the newer version):

Code:
emerge -1vua $(qlist -CI dev-qt/*)
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