1RPMS.SH(1) User Contributed Perl Documentation RPMS.SH(1)
2
3
4
6 BeakerLib - rpms - Package manipulation helpers
7
9 Functions in this BeakerLib script are used for RPM manipulation.
10
12 Rpm Handling
13 rlCheckRpm
14
15 Check whether a package is installed.
16
17 rlCheckRpm name [version] [release] [arch]
18
19 name
20 Package name like "kernel"
21
22 version
23 Package version like 2.6.25.6
24
25 release
26 Package release like "55.fc9"
27
28 arch
29 Package architucture like "i386"
30
31 Returns 0 if the specified package is installed.
32
33 rlAssertRpm
34
35 Assertion making sure that a package is installed.
36
37 rlAssertRpm name [version] [release] [arch]>
38
39 name
40 Package name like "kernel"
41
42 version
43 Package version like 2.6.25.6
44
45 release
46 Package release like "55.fc9"
47
48 arch
49 Package architucture like "i386"
50
51 Returns 0 and asserts PASS if the specified package is installed.
52
53 rlAssertNotRpm
54
55 Assertion making sure that a package is not installed. This is just
56 inverse of "rlAssertRpm".
57
58 rlAssertNotRpm name [version] [release] [arch]>
59
60 name
61 Package name like "kernel"
62
63 version
64 Package version like 2.6.25.6
65
66 release
67 Package release like "55.fc9"
68
69 arch
70 Package architucture like "i386"
71
72 Returns 0 and asserts PASS if the specified package is not installed.
73
74 Example
75
76 Function "rlAssertRpm" is useful especially in prepare phase where it
77 causes abort if a package is missing, while "rlCheckRpm" is handy when
78 doing something like:
79
80 if ! rlCheckRpm package; then
81 yum install package
82 rlAssertRpm package
83 fi
84
86 · Petr Muller <pmuller@redhat.com>
87
88 · Jan Hutar <jhutar@redhat.com>
89
90 · Petr Splichal <psplicha@redhat.com>
91
92 · Ales Zelinka <azelinka@redhat.com>
93
94
95
96perl v5.10.1 2010-05-12 RPMS.SH(1)