Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 75802 | Differences between
and this patch

Collapse All | Expand All

(-)gentoolkit.xml (-278 / +4 lines)
Lines 28-35 Link Here
28
This document covers the basics of some of the tools present in Gentoolkit.
28
This document covers the basics of some of the tools present in Gentoolkit.
29
</abstract>
29
</abstract>
30
30
31
<version>1.4</version>
31
<version>1.5</version>
32
<date>August 25, 2004</date>
32
<date>2004-12-27</date>
33
33
34
<chapter>
34
<chapter>
35
<title>Introduction</title>
35
<title>Introduction</title>
Lines 96-384 Link Here
96
</chapter>
96
</chapter>
97
97
98
<chapter>
99
<title>Querying Package Data with qpkg</title>
100
<section>
101
<title>Introduction</title>
102
<body>
103
104
<p>
105
<c>qpkg</c> is a flexible tool for determining information about installed
106
ebuilds.  It can provide information about what files belong to which ebuilds,
107
whether multiple versions of the same package are installed and what a
108
particular ebuild does. It can also be used to query some information about
109
ebuilds that have not been installed.
110
</p>
111
112
<p>
113
Calling <c>qpkg</c> with no arguments prints a list of all ebuilds with
114
asterisks (*) next to the packages that are installed on the system.
115
</p>
116
117
<note>
118
By default, <c>qpkg</c> prints output in color. To turn this off on the command
119
line, use the <c>--no-color</c> or <c>-nc</c> flag.
120
</note>
121
122
</body>
123
</section>
124
<section>
125
<title>Querying Package Information</title>
126
<body>
127
128
<p>
129
One of the most common uses for <c>qpkg</c> is determining what a given package
130
is. For instance, while looking through <path>net-misc</path>, I saw a package
131
called <path>neon</path>. Having no idea what it was, I ran qpkg.
132
</p>
133
134
<pre caption="Package Information">
135
# <i>qpkg -i net-misc/neon</i>
136
net-misc/neon-0.24.4
137
        HTTP and WebDAV client library [ http://www.webdav.org/neon ]
138
net-misc/neon-0.23.8
139
        HTTP and WebDAV client library [ http://www.webdav.org/neon ]
140
net-misc/neon-0.24.6
141
        HTTP and WebDAV client library [ http://www.webdav.org/neon/ ]
142
net-misc/neon-0.24.5
143
        HTTP and WebDAV client library [ http://www.webdav.org/neon ]
144
net-misc/neon-0.24.0
145
        HTTP and WebDAV client library [ http://www.webdav.org/neon ]
146
net-misc/neon-0.21.3
147
        HTTP and WebDAV client library [ http://www.webdav.org/neon ]
148
net-misc/neon-0.23.9
149
        HTTP and WebDAV client library [ http://www.webdav.org/neon ]
150
net-misc/neon-0.24.7
151
        HTTP and WebDAV client library [ http://www.webdav.org/neon/ ]
152
net-misc/neon-0.24.2
153
        HTTP and WebDAV client library [ http://www.webdav.org/neon ]
154
</pre>
155
156
<p>
157
<c>qpkg</c> read through the ebuild files for the nine
158
<path>net-misc/neon</path> ebuilds and printed out the information stored in
159
DESCRIPTION and HOMEPAGE.
160
</p>
161
162
</body>
163
</section>
164
<section>
165
<title>Listing Files Belonging to an Ebuild</title>
166
<body>
167
168
<p>
169
<c>qpkg</c> can also list the files that belong to an installed ebuild. I
170
know that gentoolkit installed several tools, but I don't know what they
171
all are. To find out, I can do a <c>qpkg -l</c>.
172
</p>
173
174
<pre caption="Package File list using qpkg">
175
# <i>qpkg -l app-portage/gentoolkit</i>
176
app-portage/gentoolkit-0.2.0_pre8 *
177
CONTENTS:
178
/usr
179
/usr/bin
180
/usr/bin/euse
181
/usr/bin/qpkg
182
/usr/bin/etcat
183
/usr/bin/revdep-rebuild
184
/usr/bin/glsa-check
185
/usr/bin/dep-clean
186
/usr/bin/equery
187
/usr/bin/ewhich
188
/usr/bin/pkg-size
189
/usr/lib
190
/usr/lib/gentoolkit
191
/usr/lib/gentoolkit/pym
192
/usr/lib/gentoolkit/pym/glsa.py
193
/usr/lib/gentoolkit/pym/gentoolkit.py
194
/usr/sbin
195
/usr/sbin/pkg-clean
196
/usr/sbin/mkebuild
197
/usr/share
198
/usr/share/doc
199
/usr/share/doc/gentoolkit-0.2.0_pre8
200
/usr/share/doc/gentoolkit-0.2.0_pre8/NEWS
201
/usr/share/doc/gentoolkit-0.2.0_pre8/TODO
202
/usr/share/doc/gentoolkit-0.2.0_pre8/euse
203
/usr/share/doc/gentoolkit-0.2.0_pre8/euse/TODO
204
/usr/share/doc/gentoolkit-0.2.0_pre8/euse/README
205
/usr/share/doc/gentoolkit-0.2.0_pre8/euse/AUTHORS
206
/usr/share/doc/gentoolkit-0.2.0_pre8/euse/ChangeLog
207
/usr/share/doc/gentoolkit-0.2.0_pre8/qpkg
208
/usr/share/doc/gentoolkit-0.2.0_pre8/qpkg/README
209
/usr/share/doc/gentoolkit-0.2.0_pre8/qpkg/AUTHORS
210
/usr/share/doc/gentoolkit-0.2.0_pre8/qpkg/ChangeLog
211
/usr/share/doc/gentoolkit-0.2.0_pre8/etcat
212
/usr/share/doc/gentoolkit-0.2.0_pre8/etcat/README
213
/usr/share/doc/gentoolkit-0.2.0_pre8/etcat/AUTHORS
214
/usr/share/doc/gentoolkit-0.2.0_pre8/revdep-rebuild
215
/usr/share/doc/gentoolkit-0.2.0_pre8/revdep-rebuild/TODO
216
/usr/share/doc/gentoolkit-0.2.0_pre8/revdep-rebuild/README
217
/usr/share/doc/gentoolkit-0.2.0_pre8/revdep-rebuild/AUTHORS
218
/usr/share/doc/gentoolkit-0.2.0_pre8/README
219
/usr/share/doc/gentoolkit-0.2.0_pre8/equery
220
/usr/share/doc/gentoolkit-0.2.0_pre8/equery/README
221
/usr/share/doc/gentoolkit-0.2.0_pre8/equery/AUTHORS
222
/usr/share/doc/gentoolkit-0.2.0_pre8/AUTHORS
223
/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit
224
/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit/TODO
225
/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit/README
226
/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit/AUTHORS
227
/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit/ChangeLog
228
/usr/share/doc/gentoolkit-0.2.0_pre8/ChangeLog
229
/usr/share/doc/gentoolkit-0.2.0_pre8/COPYING
230
/usr/share/man
231
/usr/share/man/man1
232
/usr/share/man/man1/revdep-rebuild.1.gz
233
/usr/share/man/man1/mkebuild.1.gz
234
/usr/share/man/man1/qpkg.1.gz
235
/usr/share/man/man1/pkg-clean.1.gz
236
/usr/share/man/man1/etcat.1.gz
237
/usr/share/man/man1/ewhich.1.gz
238
/usr/share/man/man1/equery.1.gz
239
/usr/share/man/man1/euse.1.gz
240
/usr/share/man/man1/dep-clean.1.gz
241
/usr/share/man/man1/pkg-size.1.gz
242
</pre>
243
244
<note>
245
In case you have gentoolkit-dev installed, <c>qpkg</c> will list out files for
246
that as well, i.e. it displays the file list for all installed packages with
247
the name gentoolkit.
248
</note>
249
250
</body>
251
</section>
252
<section>
253
<title>Finding the Package That a File Came From</title>
254
<body>
255
256
<p>
257
To find the package that a file came from, use the <c>-f</c> or
258
<c>--find-file</c> flag.
259
</p>
260
261
<pre caption="Finding the ebuild that installed a given file">
262
# <i>qpkg -f /usr/lib/mozilla</i>
263
net-www/mozilla *
264
</pre>
265
266
</body>
267
</section>
268
<section>
269
<title>Listing Duplicate Packages</title>
270
<body>
271
272
<p>
273
Sometimes multiple versions of the same package may exist. <c>qpkg --dups</c>
274
will print a list of duplicate packages. The existence of a duplicate package
275
though may not indicate that the older version may be removed. They may fill
276
different slots. To look for duplicates in the same slot, use <c>qpkg --dups
277
--slot</c>. I just updated KDE from 3.0 to 3.0.2, so I have some duplicates in
278
the same slot.
279
</p>
280
281
<pre caption="Finding duplicate packages">
282
# <i>qpkg --dups --slot</i>
283
app-portage/gentoolkit
284
kde-base/kdeaddons
285
kde-base/kdeadmin
286
kde-base/kdeartwork
287
kde-base/kdebase
288
kde-base/kdegames
289
kde-base/kdelibs
290
kde-base/kdemultimedia
291
kde-base/kdenetwork
292
kde-base/kdetoys
293
kde-base/kdeutils
294
media-libs/freetype
295
x11-libs/qt
296
</pre>
297
298
</body>
299
</section>
300
<section>
301
<title>Verifying Package Integrity</title>
302
<body>
303
304
<p>
305
Sometimes it is useful to check a package's integrity to know that files have
306
not been replaced since they were installed. <c>qpkg</c> can verify md5 sums as
307
well as install times to indicate whether files for the package might have been
308
corrupted, replaced, or removed.
309
</p>
310
311
<p>
312
To check both mtimes and md5 sums, use the <c>-c</c> flag.
313
</p>
314
315
<pre caption="See the Difference?">
316
# <i>qpkg cdrtools -c -v</i>
317
app-cdr/cdrtools-2.01_alpha25 *
318
/etc/default/rscsi.dfl !mtime!
319
/usr/bin/devdump !md5! !mtime!
320
/usr/bin/mkisofs !md5! !mtime!
321
/usr/bin/isovfy !md5! !mtime!
322
/usr/bin/readcd !md5! !mtime!
323
/usr/bin/cdda2wav !md5! !mtime!
324
/usr/bin/cdrecord !md5! !mtime!
325
/usr/bin/isodump !md5! !mtime!
326
/usr/bin/isoinfo !md5! !mtime!
327
/usr/lib/libfile.a !md5! !mtime!
328
/usr/lib/librscg.a !md5! !mtime!
329
/usr/lib/libunls.a !md5! !mtime!
330
/usr/lib/libedc_ecc.a !md5! !mtime!
331
/usr/lib/libdeflt.a !md5! !mtime!
332
/usr/lib/libhfs.a !md5! !mtime!
333
/usr/lib/libscg.a !md5! !mtime!
334
/usr/lib/libparanoia.a !md5! !mtime!
335
/usr/lib/libschily.a !md5! !mtime!
336
/usr/sbin/rscsi !md5! !mtime!
337
/usr/share/man/man1/cdrecord.1.gz !md5! !mtime!
338
/usr/share/man/man1/readcd.1.gz !md5! !mtime!
339
/usr/share/man/man1/cdda2wav.1.gz !md5! !mtime!
340
/usr/share/man/man8/mkisofs.8.gz !md5! !mtime!
341
76/150
342
343
app-cdr/cdrtools-2.01_alpha37 *
344
0/122
345
</pre>
346
347
<p>
348
As you can see, I have more than one version of cdrtools installed. <c>qpkg</c>
349
reports that many of the files from the older version have been changed since I
350
installed it. Those packages were most likely modified when I updated from
351
<path>cdrtools-2.01_alpha25</path> to <path>cdrtools-2.01_alpha37</path>. Note
352
that the last two lines indicate that 0 of 122 files from <path>cdrtools-2.01
353
_alpha37</path> have been changed since I installed. That is good. If any of
354
them had been changed, I would be worried.
355
</p>
356
357
</body>
358
</section>
359
<section>
360
<title>But Wait... There's More</title>
361
<body>
362
363
<p>
364
<c>qpkg</c> can be used for other querying tasks that I will not cover here.
365
There is a very complete man page for <c>qpkg</c>. Please read it for more
366
information.
367
</p>
368
369
</body>
370
</section>
371
</chapter>
372
<chapter>
98
<chapter>
373
<title>equery</title>
99
<title>equery</title>
374
<section>
100
<section>
375
<title>Introduction</title>
101
<title>Introduction</title>
376
<body>
102
<body>
377
103
378
<p>
104
<p>
379
<c>equery</c> is a tool that supports features that <c>qpkg</c> and <c>epm</c>
105
<c>equery</c> is a tool that supports features that <c>epm</c>
380
have but has its own set of features that make it really useful. <c>equery
106
has but has its own set of features that make it really useful. <c>equery
381
--help</c> gives you the full set of options. <c>equery</c> will eventually
107
--help</c> gives you the full set of options. <c>equery</c> will eventually
382
replace <c>etcat</c> at some point of time.
108
replace <c>etcat</c> at some point of time.
383
</p>
109
</p>

Return to bug 75802