[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Notes on Yum Changes

Here are some notes I typed up this weekend on a plane and in a truly
dull airport about yum changes in the upcoming test release.
Here they are:

Making yum repositories now:

Yum repositories are no longer created by yum-arch. There is a new
program, createrepo (http://linux.duke.edu/metadata/generate), that 
creates the metadata. The metadata for rpm packages is the information 
that describes the data stored in the payload of the rpm. createrepo 
takes the metadata from each rpm in the repository and stores it in an 
xml format that is simple and expedient to load the data from. This 
makes it easier and more efficient for yum to resolve dependencies 
and find out other important information about the packages a user 
would want to install.

To create your own repository install the createrepo rpm and run:

create-repo /path/to/the/packages

It will recursively go through the directory you specify, find all 
the rpm packages, and retrieve the pertinent metadata. Once this 
command completes you should have a directory named 'repodata' 
created in the directory path you specified on the command line. 
The repodata directory will contain at least 4 files. They are:

repomd.xml - stores the information about the other metadata 
files. It is a meta-metadata file. :) It has checksums and 
timestamps for each file of the metadata.

primary.xml[.gz] - stores the critical information for listing and 
dependency solving packages. It is the core of information for the 
repository and it is normally the smallest of the files containing 
package metadata.

filelists.xml[.gz] - stores the complete file listing for each 
package. It also contains some information describing the files. 
It distinguishes between files, directories and ghosted files in 
the package.

other.xml[.gz] - stores any other information that is available from 
the package. This file is available for completeness and convenience. 
In particular, this file stores all the changelog information for
each package.

If you specified the -g option to createrepo and listed a groups file 
(a comps.xml format file) then this file will also be copied to 
the repodata directory.

Yum Changes:

1. Yum will no longer work with repositories generated with yum-arch. 
The new format and the old format do not conlict with each other so 
if you want to run createrepo and yum-arch on a single repository 
that will work just fine. However, the new yum will not support
old-style repositories and there are no plans at this time to make 
it possible.

2. When specifying packages on the command line and in the exclude 
lists you can use complete version and arch strings now. In addition
to specifying:

yum install mypackage

you can now also specify:

yum install mypackage-1.1

The following version/arch string formats are accepted:


3. The config file has been enhanced in a number of ways. Inside the 
config file you can now specify include=url://some/location/file at 
any point. This allows you to include one config file inside another.
The file is included literally, as though typed in place. The include 
option takes any url that yum is capable of handling (http, https, 
ftp and file).

4. In addition to the above config change, yum also offers an 
optional /etc/yum.repos.d directory for configurations. Each file 
named with a .repo extension will be parsed and added to the set of
repositories listed in the yum.conf file. The format of these files 
is identical to the listing of a repository in the yum.conf file:

name=repository name

5. New command line options:
   --obsoletes - tell yum to include obsoletes in its update processing
   --enablerepo=repository-id - tell yum to enable the repository of 
                                that id this option can be specified 
                                multiple times on the command line. 
                                This will override the 'enabled' option
                                to a repository in the configuration 

   --disablerepo=repository-id - The logical opposite of the above.

Other new features will be added and they'll be described in more 
detail then. This should give users an overview of the major changed 
items in yum, so far.

hope this helps people.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]