aboutsummaryrefslogtreecommitdiff
blob: f1c985b3e121968bc2753cd9d0cdd72c963fa5b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.\" generated by mkman.py, please do NOT edit!
.TH qatom "1" "May 2018" "Gentoo Foundation" "qatom"
.SH NAME
qatom \- split atom strings
.SH SYNOPSIS
.B qatom
\fI[opts] <pkg>\fR
.SH DESCRIPTION
\fIqatom\fR parses strings into atoms and optionally compares them.  The
parsing into atoms results in CATEGORY, PN (package name), PV (package
version), PR (package revision), SLOT and REPO.  Next to these version
qualifiers (e.g.\ >, <, or =) and optional * suffix are extracted.  All
but PN are optional.

Comparison of atoms returns the relationship between two parsed atoms.
\fIqatom\fR does not allow to test conditions.  It is possible to
perform multiple comparisons by simply adding more arguments.
Comparisons are, however, always performed two by two, so there must be
an even count of arguments to the compare function.

The \fIqatom\fR applet is a direct wrapper around the atom parsing
functionalities used by various other applets.  As such this applet
allows easy testing or atom parsing and comparison behaviour.
.SH OPTIONS
.TP
\fB\-F\fR \fI<arg>\fR, \fB\-\-format\fR \fI<arg>\fR
Specify a custom  output  format.  The default format is
.nf
%{CATEGORY} %{PN} %{PV} %[PR] %[SLOT] %[pfx] %[sfx]
.fi
Conversion specifiers start with a \fI%\fR symbol and are followed
by either \fI{\fR or \fI[\fR.  Next is the name of the field to
expand, followed by a matching \fI}\fR or \fI]\fR.  The difference
between \fI{\fR and \fI[\fR is that the latter is only printed if
the field referred is set, while the former prints \fI<unset>\fR in
that case.

The following fields are supported, which are inline with the
variables from \fBebuild\fR(5).
.RS
.IP CATEGORY
The category of the package.
.IP P
The package name and version without the ebuild revision.
.IP PN
The package name.
.IP PV
The package version without the ebuild revision.
.IP PVR
The package version including ebuild revision, which is also printed
when zero, unlike for \fIPF\fR.
.IP PF
The package name, version and revision when not zero.  Thus, a zero
revision \fI\-r0\fR is not printed.
.IP PR
The ebuild revision, when force printed, outputs \fI\-r0\fR when unset.
.IP SLOT
The package slot, when force printed, outputs \fI\-\fR when unset.
.IP REPO
The package repository.
.IP pfx
The package prefixes, that is version specifiers.
.IP sfx
The package suffices, currently that is just the asterisk.
.RE
.TP
\fB\-c\fR, \fB\-\-compare\fR
Compare two atoms.
.TP
\fB\-\-root\fR \fI<arg>\fR
Set the ROOT env var.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Force all expansions, basically treat all \fI[\fR like \fI{\fR.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Ignored for compatibility with other qapplets.
.TP
\fB\-C\fR, \fB\-\-nocolor\fR
Ignored for compatibility with other qapplets.
.TP
\fB\-h\fR, \fB\-\-help\fR
Print this help and exit.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version and exit.

.SH "REPORTING BUGS"
Please report bugs via http://bugs.gentoo.org/
.br
Product: Portage Development; Component: Tools, Assignee:
portage-utils@gentoo.org
.SH AUTHORS
.nf
Ned Ludd <solar@gentoo.org>
Mike Frysinger <vapier@gentoo.org>
Fabian Groffen <grobian@gentoo.org>
.fi
.SH "SEE ALSO"
.BR q (1),
.BR qcache (1),
.BR qcheck (1),
.BR qdepends (1),
.BR qfile (1),
.BR qgrep (1),
.BR qlist (1),
.BR qlop (1),
.BR qmerge (1),
.BR qpkg (1),
.BR qsearch (1),
.BR qsize (1),
.BR qtbz2 (1),
.BR qtegrity (1),
.BR quse (1),
.BR qxpak (1)