61c386c0ee8fb52c3d3191a8baea6f3062fcd309
[projects/qitab/rpm.git] / README
1 RPM
2
3 This library allows you to manipulate RPM packages from CL.
4
5
6 ==== Exported Functionality ====
7
8 The rpm library creates a package RPM,
9 that exports the following macros and functions:
10
11 PARSE-RPM-VERSIONED-NAME STRING &KEY START END
12   parses the STRING (within START and END bounds)
13   as an rpm versioned package name, returning as multiple values two strings,
14   one for the base package name and the other for epoch, version and release.
15   e.g. "foo-1.4-6" ==> "foo" "1.4-6"
16
17 RPM-VERSIONED-NAME-BASENAME STRING
18   from a rpm versioned package name, extract the base package name.
19   e.g. "foo-1.4-6" ==> "foo"
20
21 RPM-VERSIONED-NAME-VERSION STRING
22   from a rpm versioned package name, extract the epoch, version and release.
23   e.g. "foo-1.4-6" ==> "1.4-6"
24
25 PARSE-RPM-PATHNAME PATHNAME
26   from the designator of a pathname to a RPM, extract as multiple values:
27   * the pathname of the parent directory
28   * the base name of the package
29   * the epoch:version-release string
30   * the architecture
31   e.g. "/tmp/foo-1.4-6.x86_64.rpm" ==> #P"/tmp/" "foo" "1.4-6" "x86_64"
32
33 RPM-PATHNAME-PACKAGENAME PATHNAME
34   from the designator of a pathname to a RPM,
35   extract the base name of the package
36   e.g. "/tmp/foo-1.4-6.x86_64.rpm" ==> "foo"
37
38 RPM-PATHNAME-VERSION PATHNAME
39   from the designator of a pathname to a RPM,
40   extract the epoch:version-release string
41   e.g. "/tmp/foo-1.4-6.x86_64.rpm" ==> "1.4-6"
42
43 RPM-VERSION= V1 V2
44 RPM-VERSION<= V1 V2
45 RPM-VERSION< V1 V2
46 RPM-VERSION>= V1 V2
47 RPM-VERSION> V1 V2
48   compares the two given epoch:version-release strings,
49   and returns T if the first is respectively
50   equal, lesser or equal, lesser, greater or equal, or greater
51   than the second one as far as RPM is concerned.
52
53 RPMS-INSTALLED &KEY PACKAGENAMES HOST
54   return a list of versioned packagenames for the RPM packages installed
55   on specified HOST (default: NIL, denoting current host),
56   that match the list of names specified in PACKAGENAMES,
57   or all packages if PACKAGENAMES is T (the default).
58
59 RPMS-TO-UPDATE DESIRED-RPMS &KEY HOST TEST
60   given a list of DESIRED-RPMS of pathnames to RPM packages,
61   a host HOST (default NIL, denoting current host),
62   a test TEST (default RPM-VERSION<=, allowing newer versions than desired),
63   return a list of the RPMs to install so all RPMs of given packagenames
64   will be install and of a version satisfying the test with the desired version.
65   With the default test RPM-VERSION<= this means that the desired RPM won't be
66   listed if an existing more recent version is installed, whereas if you supply
67   :TEST RPM-VERSION= then the desired RPM will only be skipped if
68   an exact matching version is already installed.