check-problems.1 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. .\" $OpenBSD: check-problems.1,v 1.4 2016/06/10 12:52:57 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: June 10 2016 $
  18. .Dt CHECK-PROBLEMS 1
  19. .Os
  20. .Sh NAME
  21. .Nm check-problems
  22. .Nd verify problems in package collections
  23. .Sh SYNOPSIS
  24. .Nm check-problems
  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
  32. is used to check a collection of packages for problems that cannot be
  33. noticed in individual packages, such as conflict and directory registration
  34. issues.
  35. .Pp
  36. A conflict is a file that belongs to two distinct packages.
  37. .Pp
  38. By default, packages with the same stem
  39. .Po
  40. see
  41. .Xr packages-specs 7
  42. .Pc
  43. are registered to conflict.
  44. This can be changed to add or remove extra conflict registration with
  45. .Cm @option no-default-conflict
  46. or
  47. .Cm @conflict
  48. .Po
  49. see
  50. .Xr pkg_create 1
  51. .Pc .
  52. .Pp
  53. Conflicts between packages mean that a user can't have both packages installed
  54. at the same time.
  55. In some cases (same software, different version), this is expected, but
  56. the packages should be marked as conflicting, so that
  57. .Xr pkg_add 1
  58. knows how to deal with it.
  59. In other cases, this is an oversight from the ports maintainer, and action
  60. should be taken to make sure both packages can be installed simultaneously.
  61. Conflicts also interact with dependencies, and sometimes a missing dependency
  62. will show up as an unregistered conflict.
  63. .Pp
  64. Directories can belong to distinct packages, as long as they are registered
  65. somewhere.
  66. Every directory that is not part of the standard
  67. .Xr mtree 8
  68. set should appear in a packing-list somewhere.
  69. .Pp
  70. Contrary to files, directories can be shared between several packages.
  71. .Pp
  72. .Nm
  73. knows enough about packages to trace directories back to a common dependency,
  74. or to not flag two packages as conflicting when they depend on already
  75. conflicting packages.
  76. .Pp
  77. .Nm
  78. requires a set of packing-lists to operate, which it can obtain from
  79. several sources.
  80. The preferred source is the packing-list databases
  81. .Po
  82. see
  83. .Ar PACKAGE_REPOSITORY
  84. in
  85. .Xr bsd.port.mk 5
  86. and
  87. .Xr register-plist 1
  88. .Pc ,
  89. as it persists over time and can be used to fix update information as well
  90. as current version information.
  91. .Pp
  92. It should be supplemented with the ports tree itself in order to figure
  93. out current versions.
  94. .Pp
  95. Options are as follows:
  96. .Bl -tag -width packing-list
  97. .It Fl C
  98. Do not compute conflict information.
  99. .It Fl D
  100. Do not compute common dir information.
  101. .It Fl e
  102. Check for extra logical conflicts, by adding supplementary
  103. formatted/unformatted manpages, as same name manpages under the
  104. same base directory will shadow one another.
  105. .It Fl o Ar output
  106. Save results to output file as well as writing it on the screen.
  107. .It Fl s
  108. Be silent.
  109. .It Fl v
  110. Be verbose.
  111. .It Fl d Ar plist-dir
  112. Scan directory
  113. .Ar plist-dir
  114. for packing-lists.
  115. .It Fl p Ar portsdir
  116. Traverse the ports directory for packing-lists, using
  117. .Ar print-plist-all .
  118. More than one directory could be specified by delimiting them by colon,
  119. e.g.:
  120. .Pa /usr/ports/x11/kde:/usr/ports/x11/kde4 .
  121. .Pp
  122. If
  123. .Fl d Ar plist-dir
  124. is also used, traverse only the directories corresponding to the packages
  125. under
  126. .Ar plist-dir
  127. to figure out current pkgnames, and annotate those with a
  128. .Sq \&!
  129. in the report.
  130. .El
  131. .Sh SAMPLE OUTPUT
  132. .Bd -literal
  133. Dependency not found zarafa-webaccess-7.1.11p2
  134. Dependency not found kwebkitpart-1.2p3
  135. [...]
  136. Common 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. [...]
  140. Conflicts:
  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. [...]
  160. zathura-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
  165. Dependency not found: means some package names could not be found.
  166. Most often happens because of panic issues, and fsck not recovering some
  167. dependency files.
  168. .It
  169. claws-mail directory: missing directory registration.
  170. .Nm
  171. could not find a common ancestor to claws-mail-gdata and claws-mail-pdfviewer,
  172. so it should be added to both.
  173. .It
  174. Conflict between arm-non-eabi-gdb and gdb:
  175. note that both packages are current.
  176. Two choices: either remove the offending files from one package (might break
  177. the other), or mark an explicit conflict between the packages (will prevent
  178. people from installing both at the same time).
  179. .It
  180. Conflict between libnet-...v0 and libnet:
  181. Note that only the v0 version is current.
  182. People forgot to augment the
  183. .Cm @option no-default-conflict
  184. with 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