xref: /openbsd/share/man/man1/pkg_check-problems.1 (revision 274d7c50)
1.\"	$OpenBSD: pkg_check-problems.1,v 1.1 2018/07/10 09:05:47 espie Exp $
2.\"
3.\" Copyright (c) 2010-2015 Marc Espie <espie@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: July 10 2018 $
18.Dt PKG_CHECK-PROBLEMS 1
19.Os
20.Sh NAME
21.Nm pkg_check-problems
22.Nd verify problems in package collections
23.Sh SYNOPSIS
24.Nm
25.Op Fl CDesv
26.Op Fl d Ar plist_dir
27.Op Fl o Ar output
28.Op Fl p Ar ports_dir
29.Op Ar pkgname ...
30.Sh DESCRIPTION
31.Nm
32is used to check a collection of packages for problems that cannot be
33noticed in individual packages, such as conflict and directory registration
34issues.
35.Pp
36A conflict is a file that belongs to two distinct packages.
37.Pp
38By default, packages with the same stem
39.Po
40see
41.Xr packages-specs 7
42.Pc
43are registered to conflict.
44This can be changed to add or remove extra conflict registration with
45.Cm @option no-default-conflict
46or
47.Cm @conflict
48.Po
49see
50.Xr pkg_create 1
51.Pc .
52.Pp
53Conflicts between packages mean that a user can't have both packages installed
54at the same time.
55In some cases (same software, different version), this is expected, but
56the packages should be marked as conflicting, so that
57.Xr pkg_add 1
58knows how to deal with it.
59In other cases, this is an oversight from the ports maintainer, and action
60should be taken to make sure both packages can be installed simultaneously.
61Conflicts also interact with dependencies, and sometimes a missing dependency
62will show up as an unregistered conflict.
63.Pp
64Directories can belong to distinct packages, as long as they are registered
65somewhere.
66Every directory that is not part of the standard
67.Xr mtree 8
68set should appear in a packing-list somewhere.
69.Pp
70Contrary to files, directories can be shared between several packages.
71.Pp
72.Nm
73knows enough about packages to trace directories back to a common dependency,
74or to not flag two packages as conflicting when they depend on already
75conflicting packages.
76.Pp
77.Nm
78requires a set of packing-lists to operate, which it can obtain from
79several sources.
80The preferred source is the packing-list databases
81.Po
82see
83.Ar PACKAGE_REPOSITORY
84in
85.Xr bsd.port.mk 5
86and
87.Xr register-plist 1
88.Pc ,
89as it persists over time and can be used to fix update information as well
90as current version information.
91.Pp
92It should be supplemented with the ports tree itself in order to figure
93out current versions.
94.Pp
95Options are as follows:
96.Bl -tag -width packing-list
97.It Fl C
98Do not compute conflict information.
99.It Fl D
100Do not compute common dir information.
101.It Fl e
102Check for extra logical conflicts, by adding supplementary
103formatted/unformatted manpages, as same name manpages under the
104same base directory will shadow one another.
105.It Fl o Ar output
106Save results to output file as well as writing it on the screen.
107.It Fl s
108Be silent.
109.It Fl v
110Be verbose.
111.It Fl d Ar plist-dir
112Scan directory
113.Ar plist-dir
114for packing-lists.
115.It Fl p Ar portsdir
116Traverse the ports directory for packing-lists, using
117.Ar print-plist-all .
118More than one directory could be specified by delimiting them by colon,
119e.g.:
120.Pa /usr/ports/x11/kde:/usr/ports/x11/kde4 .
121.Pp
122If
123.Fl d Ar plist-dir
124is also used, traverse only the directories corresponding to the packages
125under
126.Ar plist-dir
127to figure out current pkgnames, and annotate those with a
128.Sq \&!
129in the report.
130.El
131.Sh SAMPLE OUTPUT
132.Bd -literal
133Dependency not found zarafa-webaccess-7.1.11p2
134Dependency not found kwebkitpart-1.2p3
135[...]
136Common dirs:
137!claws-mail-gdata-3.11.1p1-ldap(mail/claws-mail,-gdata,ldap): /usr/local/lib/claws-mail
138!claws-mail-pdfviewer-3.11.1p1-ldap(mail/claws-mail,-pdfviewer,ldap): /usr/local/lib/claws-mail
139[...]
140Conflicts:
141!arm-none-eabi-gdb-7.9.1(devel/arm-none-eabi/gdb),!gdb-7.9.1(devel/gdb)
142	/usr/local/include/gdb/jit-reader.h
143	/usr/local/share/gdb/system-gdbinit/elinos.py
144	/usr/local/share/gdb/system-gdbinit/wrs-linux.py
145!libnet-1.0.2ap0v0(net/libnet/1.0),libnet-1.0.2ap2(net/libnet/1.0),libnet-1.0.2av0(net/libnet/1.0)
146	/usr/local/bin/libnet-config-1.0
147	/usr/local/include/libnet-1.0/libnet.h
148	/usr/local/include/libnet-1.0/libnet/libnet-asn1.h
149	/usr/local/include/libnet-1.0/libnet/libnet-functions.h
150	/usr/local/include/libnet-1.0/libnet/libnet-headers.h
151	/usr/local/include/libnet-1.0/libnet/libnet-macros.h
152	/usr/local/include/libnet-1.0/libnet/libnet-ospf.h
153	/usr/local/include/libnet-1.0/libnet/libnet-structures.h
154	/usr/local/lib/libnet-1.0/libnet.a
155	/usr/local/lib/libnet-1.0/libnet.so.0.0
156	/usr/local/lib/libnet-1.0/libpwrite.a
157	/usr/local/lib/libnet.so.0.0
158	/usr/local/man/cat3/libnet.0
159[...]
160zathura-pdf-mupdf-0.2.7(textproc/zathura/plugins/mupdf),zathura-pdf-poppler-0.2.5(textproc/zathura/plugins/poppler)
161	/usr/local/lib/zathura/pdf.so
162.Ed
163.Bl -bullet
164.It
165Dependency not found: means some package names could not be found.
166Most often happens because of panic issues, and fsck not recovering some
167dependency files.
168.It
169claws-mail directory: missing directory registration.
170.Nm
171could not find a common ancestor to claws-mail-gdata and claws-mail-pdfviewer,
172so it should be added to both.
173.It
174Conflict between arm-non-eabi-gdb and gdb:
175note that both packages are current.
176Two choices: either remove the offending files from one package (might break
177the other), or mark an explicit conflict between the packages (will prevent
178people from installing both at the same time).
179.It
180Conflict between libnet-...v0 and libnet:
181Note that only the v0 version is current.
182People forgot to augment the
183.Cm @option no-default-conflict
184with conflicts against the old version when bumping the
185.Ar EPOCH .
186.El
187.Sh SEE ALSO
188.Xr pkg_add 1 ,
189.Xr pkg_create 1 ,
190.Xr bsd.port.mk 5 ,
191.Xr packages-specs 7
192