LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora - Installation (http://www.linuxquestions.org/questions/fedora-installation-39/)
-   -   Fedora Distribution Upgrade (http://www.linuxquestions.org/questions/fedora-installation-39/fedora-distribution-upgrade-841973/)

rayfward 11-02-2010 04:40 PM

Fedora Distribution Upgrade
 
Well it's Fedora release time again.
The last couple of upgrades I decided to reinstall from fresh on the grounds that my install was stale and while not exactly broken had some quirks and kinks that only a fresh install would fix.
This was fine with one exception, putting all the package back in. If like me you believe variety is the spice of life or I'll try anything once then you'll have a lot of packages installed as do I.

So...

I need a method of exporting my package list to a file and then getting yum or some other fiendish application to drag them all back in.

Any ideas?
:jawa:

PTrenholme 11-02-2010 06:25 PM

Try something like this: rpm -q -a -l --qf "%{URL} | %{SUMMARY}" | grep -v ^/ > list_of_rpms

Note that the list generated by the above will point to the source of the package, not the actual package name. Look at man rpm for other options, and rpm --querytags fo a list of what you can put in the --qf format tags.

rayfward 11-03-2010 01:45 AM

I think I see where your going with this one.
Bypass yum all together and install directly from the repository.

Is this what you expect to see?

Sample.
ftp://people.redhat.com/sopwith/ | Tool for getting the date/time from a remote machine/usr/bin/rdate
http://www.foolabs.com/xpdf/ | A PDF file viewer for the X Window System/etc/xpdf
http://code.openbossa.org/projects/qedje | A library combining the benefits of Edje and Qt/usr/bin/qedje_viewer
http://kornelix.squarespace.com/printoxx/ | Print image files/usr/bin/printoxx
http://projects.gnome.org/totem/ | Mozilla plugin for Totem/usr/lib/mozilla/plugins/libtotem-cone-plugin.so

Thanks.

PTrenholme 11-03-2010 09:20 PM

Yes and no. Yes, that's what the code I suggested should show, and, no, it's not a suggestion to "bypass" YUM.

The point is that the YUM package name is, typically, the terminal name in the source url name. (I.e., in your first example, that package name is probably "sopwith," etc.) You should probably still use YUM to install the packages, although the "Yellow dog Update Manager" started "life" as a front-end to rpm, and you could - with some effort - use rpm directly to re-install your packages (if you need to do so).

F.Y.I., I just finished running "preupdate" on my laptop and, as far as I can see so far, all the packages I had installed in F13 (and F12) are still available and working in F14. (I did have some problems with the preupdate, but that was because my boot configuration is very "non-standard," and anaconda couldn't handle it properly.)

rayfward 11-04-2010 03:02 AM

The exporting of packages set me off on another trail.
I have done a bit more rooting around since the last post. I installed the service pack creator which produces a nice parse-able export list.
Sample.
installed kacst-fonts-common;2.0-7.fc13;noarch;installed Common files for kacst-fonts
installed filesystem;2.4.31-1.fc13;i686;installed The basic directory layout for a Linux system
installed telepathy-filesystem;0.0.2-1.fc12;noarch;installed Telepathy filesystem layout
installed xml-common;0.6.3-32.fc13;noarch;installed Common XML catalog and DTD files
installed hal-filesystem;0.5.14-3.fc13;i686;installed Filesystem layout for HAL
installed mozilla-filesystem;1.9-5.fc12;i686;installed Mozilla filesytem layout
installed ca-certificates;2010-2.fc13;noarch;installed The Mozilla CA root certificate bundle
installed dmz-cursor-themes;0.4-3.fc13;noarch;installed X cursors themes

I could not find any reference on how you would use this to recall packages. I'm now leaning towards possibly doing a ruby script to launch yum with the list. This would probably mean installing one package at a time.

I too have a laptop plus one other desktop. Preupdate is attractive and my boot configuration is about as standard as it gets, F13 to F14 in principal should be straight forward. The thing that put me off was a comment at Fedora's upgrade page that upgrading this way was not really tested .

http://fedoraproject.org/wiki/YumUpgradeFaq

Any further insights would be much appreciated.

syg00 11-04-2010 04:08 AM

The Install guide is usually a good place to start. this section has some commands you might find handy (note the reference to 8.14.2 as well).

PTrenholme 11-04-2010 05:10 PM

If I recall correctly, yum has an option to read the package list from a file. If that's correct, you might only need to build the list.

You might want to look at the source code for the yumex application. As part of its initialization it generates a database file containing all the installed packages (using yum), so it may be possible to get yum to generate the list for you, but I couldn't see any obvious way to do that whilst reading the yum manual pages.

rayfward 11-05-2010 05:58 PM

syg00 link looks promising.
The article seems focused on post upgrade snagging but the command line below looks good.

su -c 'yum install `cat /tmp/pkgs-to-install.txt`'

I think I'll test this on a virtual F14 machine.

rayfward 11-09-2010 02:31 AM

1 Attachment(s)
Update.
Using this to obtain a list.
rpm -qa --qf '%{NAME}\n' | sort | uniq > ~/Public/new-pkgnames.txt

And this.
su -c 'yum install `cat ~/Public/new-pkgnames.txt`'

Produces this.

rayfward 11-19-2010 01:03 AM

Update.
Ok this on the whole works.
Some things to remember.
1) Put your package lists back in before you start pushing your packages back in.
2) Allow plenty of time. It took 20 minuets to install Fedora 14 and 2 1/2 hours to get stuff back in.
3) Anything you added manually to root "/" folders will be lost.
4) Any databases in root tree will be lost, back it up before beginning.

I have a custom file system layout as follows.
/boot
/
/home

Boot and root "/" are disposable however home is mounted on a separate volume. I have always done this but most installs will default putting home on the root partition. Again this will destroy you home folder if you do not separate your home folder from root.

LVM This is untested. You either love LVM or hate it. By default Fedora seems to think we love it and will configure systems to use it. Personally I hate it.


When launching yum for the install use --skip-broken you will get most of the packages back in. I managed about 98% of mine, what was missing wasn't worth worrying about.

When you first log back your desktop might be corrupted, not working as you had it, Compiz or other 3D desktops don't seem to pick up from where they left off which is strange considering your on/off and configuration is in your home folder.
Turn off 3D then back on again. That worked for me.

My laptop has an intel graphics chip, so my accelerated desktop works out of the box.
Ati and Nvidia users may need a little more effort.

As always backup your data. You know it makes sense.

I have had my new install for over a week with no noticeable problems except with wine. But then again Wine ability to self destruct on update is not uncommon.


All times are GMT -5. The time now is 06:10 AM.