LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   urpmi rollback? (https://www.linuxquestions.org/questions/mandriva-30/urpmi-rollback-301466/)

Blackhawkckc 03-14-2005 10:50 AM

urpmi rollback?
 
When using urpmi, if say you install some packages and it screws something, is there a command for urpmi uninstall the last packages installed and so roll back to your last working setup?

acid_kewpie 03-14-2005 11:55 AM

nope.

Blackhawkckc 03-14-2005 01:24 PM

Hmm. well, be nice if it did. I Installed KDE 3.4 via urpmi. All things considered, it went well enough. The only app I cant get running is amarok, which kinda bites. But hey thanks for the fast response.

acid_kewpie 03-14-2005 01:41 PM

urpmi is only a wrapper to rpm. any rollback functionality would (i assume) need to be present in the base RPM libraries, and it's just not there at all.

opjose 03-14-2005 05:37 PM

Bleh... wrong answer... in a manner of speaking...

Let's say you want to roll back to KDE 3.2 as packaged with Mandrake 10.1 but don't want to delete all of your other stuff nor re-install....

Ok, the safest way of doing things is to COMPLETELY uninstall KDE...

But you need to make sure you pick up everything... so... log out...

Switch to a text console... then log in as root.

Then...

service dm stop

This kills the display manager.

Make sure all of your RPM/URPMI sources are set up before you proceed... and that you have Internet Connectivity just in case...

Now let's get rid of KDE...

To find the packages you need to uninstall type

rpm -qa | grep kde

Hmm... this produces a nice list, what about automatically uninstalling them...

Sure thing...

rpm -e `rpm -qa | grep kde `

Now it may stop with a message about certain dependant packages.

In this case it may be a good idea to also uninstall them by adding them to the command line...

e.g.

rpm -e `rpm -qa | grep kde ` blah.10.x-mdk.rpm blah2.10.xmdk.rpm

Make note of which additional packages it says are affected.

If they are merely 10.1 packages or those available via the repository you can do this...

rpm -e `rpm -qa | grep kde ` --nodeps

Then remove ANY kde 3.3 or 3.4 sources from URPMI and go to town with

urpmi kde

or better yet switch to your CD/DVD RPM directory and type

urpmi `find . | grep kde`

and let it do it's thing...

Once done

urpmi --auto-select to bring everything back up to par...

You can also pass -e and other options to urpmi, and it appears that it MAY be possible to get it to uninstall EVERYTHING affected but I haven't played around with the parameter passing to be sure.



So YES you can roll back with a little bit of effort.

Blackhawkckc 03-14-2005 08:38 PM

Cool. I don't think I'm going to go back, but that is exactly what i was after should something go very badly. Thanks for that. Some things are not as I'd like them, but this is apparently KDE 3.4rc1, not a final. I figured I would give it a go and I can sort it out when I upgrade mandrake to 10.2. Got amarok working too, so I'm happy.

acid_kewpie 03-15-2005 02:36 PM

that's no rollback. that's just manually erasing packages! to me, roll back is being able to say, "undo the last two packages" or "make it like it was thursday morning".... obviosuly you can remove packages...

Padma 03-15-2005 02:38 PM

Yeah, there's no "rollback", but you can manually reconfigure (i.e., erase and reinstall packages). :)

Blackhawkckc 03-15-2005 03:14 PM

No it's not a rollback, but for what I was doing, it would work. That's all I was after really and I appreciate the help. Though, a true rpm rollback capability would be really nice.

opjose 03-15-2005 03:20 PM

Quote:

Originally posted by acid_kewpie
that's no rollback. that's just manually erasing packages! to me, roll back is being able to say, "undo the last two packages" or "make it like it was thursday morning".... obviosuly you can remove packages...

Some people are so contrarian...

rpm --oldpackage

(I forgot the exact syntax...)

when used with urpmi ,as an argument to it you get something that is very very close to true rollback.

acid_kewpie 03-15-2005 03:39 PM

again, installing old software is not rollback... it's just installing old software.

opjose 03-15-2005 03:45 PM

... much the same way that rolling back in XP does nothing more than re-install the old drivers and registry entries for those drivers, it's not a true "snapshot"....

True "roll back" would entail re-imaging a drive to a prior snapshot...

Hmm... you CAN do this in Linux if you wanted to, but it's beyond this discussion.


All times are GMT -5. The time now is 02:46 PM.