yum exercise

yum (Yellow Dog updater Modified) is an answer to the difficulty of locating and reconciling interdependent rpm packages. rpm is a local solution, yum a global one superimposed on rpm in network environments.

Examine yum's configuration file:

cat  /etc/yum.conf

Change the value of "keepcache" from 0 to 1 with an editor. Note the cachedir setting, to learn where yum stores the rpm package files and related information it downloads and installs for you in the course of operation. Examine what's in there currently:

ls  -lR  /var/cache/yum  |  more

Find out which repositories yum is "pointing" to, by looking into /etc/yum.repos.d which contains effectively a repository list:

ls  /etc/yum.repos.d

one repository per file. "Teach" your system another, new repository for its use by placement of another, new repository file in /etc/yum.repos.d. As a model of what a repository file must contain, look at one.

more  /etc/yum.repos.d/fedora.repo

The central item is the URL that tells yum where it can find the indicated repository, with its treasure of collected rpm packages. To add a third-party repository (not maintained by the Fedora project), you must add the corresponding information for it to /etc/yum.conf or to a stand-alone configuration file with the same contents placed in /etc/yum.repos.d/. This can be done by manual typing or cut-and-paste. However nowadays most 3rd-party repository sites deliver the new configuration file (and a few other) via the rpm mechanism itself. At http://linux-project.org/taxonomy/term/4 I found this list:

Fedora Third Party YUM Repositories
* DAG - http://dag.wieers.com/home-made/apt/
* Dries - http://dries.ulyssis.org/rpm/
* FreshRPMS - http://freshrpms.net/
* NewRPMS - http://newrpms.sunsite.dk/
* ATrpms - http://atrpms.net/
* RPM Fusion - http://rpmfusion.org/

Let's install the FreshRPMs repository on your system. Visit the above URL for FreshRPMs and find the link "The easiest way to install freshrpms.net packages is to click here from...." and save to your disk the file to which it links. That file is freshrpms-release-1.1-1.fc.noarch.rpm. Find out what's inside it:

rpm  -qilp  freshrpms-release-1.1-1.fc.noarch.rpm

(If you need to supply a full pathname, it probably landed in ~/Desktop or ~/Download when you downloaded it.) Note the presence among the several contained files of /etc/yum.repos.d/freshrpms.repo. Install this rpm:

rpm  -Uvh  freshrpms-release-1.1-1.fc.noarch.rpm

then look at the main result:

ls  -l  /etc/yum.repos.d
cat  /etc/yum.repos.d/freshrpms.repo

The presence of this file makes yum newly aware of the freshrpms repository. From among the repositories yum knows, find out for which packages updates are available:

yum  check-update

This command checks for updates of all packages that are installed on your system (recorded by rpm and revealed by "rpm -qa") on all repositories of which yum is aware. Note that its screen messages refer to freshrpms, indicating it is looking there to determine what's available. If your installation is late in the version cycle and you have not updated it, there will be updates for just about every package. If you installed a version of Fedora yesterday that was released the day before, there may be none. Probably you have firefox installed on your system but not yumex. (Yumex is a graphical front-end to yum; firefox is a graphical http client.) Find out about getting their most up-top-date versions onto your system.

yum  install  yumex  firefox

If it offers to install and/or update either or both (expected), go ahead. After yumex has been installed and firefox updated, repeat the same command.

yum  install  yumex firefox

This time it should report that there's nothing to do. Because yum has just done it. Re-examine the cache

ls  -lR  /var/cache/yum  |  more

You should see residual files there from having installed yumex and firefox, because you earlier set "keepcache" to 1 in yum.conf. Otherwise, yum would, after using a file it downloaded, clean up after itself by deleting it.

Now that you have it, launch yumex. With the X Window GUI loaded, from a terminal window:

yumex  &

Note yumex is just a graphical front-end to the character-based yum you've just been using. Use it to display a list of available multimedia applications. Locate totem, a movie player, in the list. Check the checkbox and then the "Process queue" button. yumex (using yum to do so) prepares to install totem. It reveals that totem has a dependency, which it has found for you. For packages with many dependencies, installing without the aid of a package manager like yum would be complicated and time-consuming. Go ahead and let yumex install totem. totem is one of the applications that comes from the freshrpms repository. Without having installed that repository you would not be able to use yum to get totem. Once it's installed, you can run it if you wish from the command line: "totem &".