History log of /freebsd-9.3-release/usr.sbin/pkg_install/info/show.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 241135 02-Oct-2012 bapt

MFC r240682

if a file in plist starts with / then do not prefix it with "prefix" [1]
pkg info -g returns 1 if a file mismatch [2]
flush stdout in pkg info -g [3]
clean up quiet mode (-q | --quiet) output of pkg_version(1) [4]
fix missing error call in uname check added to pkg_version(1) [5]
fix pkg_add(1) fails to install with -C from bad path [6]
only resolve path from pkg_add(1) -p if the given prefix do not start with a '/' [7]

PR: bin/13128 [1]
bin/139015 [2]
bin/113702 [3]
bin/142570 [4]
bin/146857 [5]
bin/157543 [6]
Submitted by: cy [1]
Anton Yuzhaninov <citrin@citrin.ru> [2]
Ighighi <ighighi@gmail.com> [3]
"N.J. Mann" <njm@njm.me.uk> [4]
gcooper [5]
David Naylor <naylor.b.david@gmail.com> [6]
netchild [7]


# 231108 07-Feb-2012 emaste

MFC r226697 and r226708:

Avoid printing // for packages that install to /

I have some packages that install to / (for whatever reason). Right now we
print entries of the form //path/to/file when listing files (pkg_info -L,
pkg_info -g etc.) This change avoids printing the redundant / .

Staticify elide_root() for now to fix build.


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 222035 17-May-2011 flz

Backout libinstall.a -> libpkg commit.

Discussed with: erwin, brooks, bapt


# 207113 23-Apr-2010 flz

- Take libinstall.a out of pkg_install and make it a proper shared library.
- Rework the wrapper support to check libpkg version as well as pkg_install
version.
- Add libfetch to _prebuild_libs.
- There are no new features introduced.

Notes: the API is not stable, so basically, do not use libpkg in your
projects for now. Also there's no manpage for libpkg yet, because the API
will change drastically. I repeat, do not use libpkg for now.


# 166552 07-Feb-2007 pav

Fix a bug in 1.40 - it missed three occurences in pkg_info which leads to
(null)/file output.

MFC after: 1 week


# 154102 07-Jan-2006 krion

When using @cwd %%FOO%%, we must ensure to return in the original
prefix later, but doing so with @cwd %%OLDPREFIX%% (having
PLIST_SUB+="OLDPREFIX=${PREFIX}") hardcodes the value in the packing
list. That's not really a problem when dealing with ports but that's
a problem with packages since pkg_add -p option only overrides the
first @cwd occurrence.

This patch allow us to use @cwd without any argument. If no
directory argument is given, it will set current working directory
to the first prefix given by the @cwd command.

PR: bin/77212
Submitted by: flz


# 150522 24-Sep-2005 krion

Remove '\n' since it's redundant in case if file doesn't exist while
running 'pkg_info -g'

Based on PR: bin/42609
Submitted by: Jeff King <peff-freebsd at peff dot net>
MFC after: 3 days


# 147381 14-Jun-2005 krion

Implement @noinst field which has at the moment the same meaning and
function as @comment has. But will be valid only for files and not
for md5 sums, rcsid's and comments in the future.

Submitted by: flz
Approved by: re@ (scottl)


# 115324 26-May-2003 lioux

Add a trailing '\n' character if none is found in the information
obtained from a package. Patch show_file() [1] and show_index() [2]
functions.

PR: 52097
Reviewed by: bento, kris,
portmgr, re,
Michael Nottebrock <michaelnottebrock@gmx.net>,
Martin Horcicka <horcicka@FreeBSD.cz>
Approved by: re (scottl)
Obtained from: NetBSD [1],
OpenBSD [2]
MFC after: 1 week


# 113594 17-Apr-2003 kris

* Add explicit conflict-checking to the package tools. Packages can
register a list of other packages with which they conflict (via the
-C option to pkg_create), and they will refuse to install (unless -f is
specified) if one of the listed packages is already present.

* Update documentation for the new feature as well as fleshing out some
existing documentation.

* Bump PKG_INSTALL_VERSION so this feature can be tested for.

Submitted by: Sergey Matveychuk <sem@ciam.ru>
PR: bin/47145
MFC after: 2 weeks


# 112579 24-Mar-2003 mdodd

- Add the 'b' option which causes BLOCKSIZE to be hornored when
the 'q' or 'Q' options are present.
- Document BLOCKSIZE.


# 108455 30-Dec-2002 mike

Back out rev 1.33; getbsize(3)'s original interface has been restored.

Approved by: markm


# 105882 24-Oct-2002 gallatin

getbsize() now takes a pointer to a size_t as its first arg. A pointer
to an int no longer works on an LP64 platform...


# 96392 11-May-2002 alfred

replace __FUNCTION__ with standardized __func__.

Requested by: jhb


# 96388 11-May-2002 alfred

fix build:
you may not use string concatination with __FUNCTION__, replace all occurances
of:
__FUNCTION__ ": error string"
with:
"%s: error string"


# 96076 05-May-2002 sobomax

New feature: allow origins of all dependencies be recorded into package list
using new `@comment DEPORIGIN:...' directive. This would allow us to make
many neat things including:

- easier binary upgrades;
- source upgrades without using external tools by simply extending
bsd.port.mk and pkg_install tools;
- mixed-mode upgrades (source + binary);
- depreciate and deorbit silly +REQUIRED_BY files in the near future.

This feature is no-op until appropriate bsd.port.mk patch is committed, and
even when it is already committed packages generated will remain 100%
compatible with old set of pkg_install tools (module all those neat
features, of course).

MFC after: 6 days


# 96065 05-May-2002 sobomax

Handle PLIST_ORIGIN properly.

Poked by: kris
Pointy hat grabbed by: sobomax
MFC after: 6 days


# 96031 04-May-2002 sobomax

(forced)

Previous delta (pkg_info -O) is subject of:

MFC after: 1 week


# 96030 04-May-2002 sobomax

Add ability to query installed packages based on origin.


# 95933 02-May-2002 sobomax

Make `-g' working for symlinks.

PR: 33857
Submitted by: darren <igla@batterybackups.net>
MFC after: 1 week


# 93520 01-Apr-2002 obrien

Fix SCM ID's.


# 84750 10-Oct-2001 sobomax

- Introduce a notion of `packing list format version'. This allows making
non-backward compatible changes in the format of packing list and handle
them gracefully;
- fix a longstanding issue with symlinks handling. Instead of recording
checksum for the file symlink points to, record checksum for the value
returned by readlink(2). For backward compatibility increase packing list
format minor version number and provide a fallback to a previous behaviour,
if package in question was created with older version of pkg_* tools;

Submitted by: Alec Wolman <wolman@cs.washington.edu>, sobomax

- don't record MD5 checksum for device nodes, fifo's and other non-regular
files.

Submitted by: nbm
MFC in: 2 weeks


# 84745 10-Oct-2001 sobomax

WARNS=2 cleanup.

Tested on: i386, alpha
MFC after: 2 weeks


# 81218 06-Aug-2001 kris

Recognise @option directives instead of falling through to the default
"unknown command" clause.

PR: 29262


# 74699 23-Mar-2001 sobomax

- Add which(1)-like functionality into pkg_info;
- fix a harmless bug in match_installed() function introduced in my last
commit;
- uniformely reorder includes across files.

Submitted by: Garrett Rooney <rooneg@electricjellyfish.net>
Not objected by: jkh, -ports


# 72034 05-Feb-2001 sobomax

-pedantic mode:
- Add a missed prototype for the recently added show_cksum() function;
- put in "explicit braces to avoid ambitious else" suggested by gcc(1).


# 71965 03-Feb-2001 jkh

Add a -g flag for verifying an installed package against its recorded
checksums (to see if it's been modified post-installation). Naturally,
this mechanism is only as secure as the contents of /var/db/pkg if you're
using it for auditing purposes.

Submitted by: Roman Shterenzon <roman@xpert.com>


# 67454 23-Oct-2000 sobomax

Add "-o" option to pkg_create(1) and pkg_info(1). This option intended to record
a path of the port from which package has been created within FreeBSD Ports
Collection and will be used to improve pkg_version(1) and similar tools.

Reviewed by: ports@FreeBSD.org, jkh
Approved by: jkh


# 67429 22-Oct-2000 jkh

Cause fatal error messages to be a little more helpful to the programmer
concerning where they're taking place.

Switch from [r]index() to str[r]chr() functions, which are more ISO
compliant.

Prompted by: Edward Welbourne <eddy@vortigen.demon.co.uk>


# 66339 25-Sep-2000 marko

Make the ``-r'' option actually do something :)
Also tidy up it's output.

Approved by: jkh


# 62775 07-Jul-2000 sobomax

New option "-s" to query size of the installed package(s).

PR: 19445
Submitted by: sobomax
Reviewed by: knu
Approved by: silence


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 49637 11-Aug-1999 billf

-Wall fixes. Ambigious if/elses, uninitialized values, missing headers,
missing prototypes, and empty format strings.


# 30531 18-Oct-1997 jkh

Deal with PLIST_UNEXEC properly.
PR: 4784
Submitted by: Stefan `Sec` Zehl <sec@quit.42.org>


# 30221 08-Oct-1997 charnier

Use err(3). Cosmetics in usage string and man page.


# 22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 16549 20-Jun-1996 jkh

Make pkg_install understand and use libftpio instead of its own
copies of the ftp support routines. Also some cosmetic and minor
bug fixes I've been meaning to incorporate for awhile.


# 9781 29-Jul-1995 ache

If some files lost in /var/db/pkg/<port>/ after system crash f.e.,
pkg_manage silently dumps core, pkg_info claims about them to
stderr, which makes very difficult to find what directory cause it via
tons of pkg_info -a output. I found solution which covers both variants,
now pkg_info claims about missing files to stdout among valid output
with ERROR: prefix. It heals pkg_manage to not dump core and makes
easy to find errors in pkg_info -a output by simple /ERROR 'more' command.


# 8857 30-May-1995 rgrimes

Remove trailing whitespace.


# 5399 04-Jan-1995 swallace

Added new function show_index() which does a 'smart' display of the index file.
Index descriptions are limited to MAXINDEXSIZE (60) chars. Any description
beyond that is truncated. Also, only the first line is displayed as well.
This allows pkg_info -a -I to be formated in two columns with one line
per package for easy reading.

Reviewed by: jkh


# 4996 05-Dec-1994 jkh

Many of John T. Kohl's patches from NetBSD. Thanks, John!
Submitted by: jkohl


# 411 07-Sep-1993 jkh

Added two new options, one of which is fairly far reaching:

-q turns on "quiet" mode, where informational headers and such are not
dumped, just the information.

-L Shows full pathnames of files comprising a package. With -q,
this can be useful for doing fileset operations, such as
"du -s `pkg_info -q -L foo_bin`" to see how much space package
"foo_bin" is taking up.


# 379 03-Sep-1993 jkh

Lots of misc tweaks, support for arbitrary separators in pkg_info, more
intelligent name handling in pkg_create. Most of these files are changed
because of rcsid's being different in my cvs tree and freefall's (foo).


# 328 25-Aug-1993 jkh

This commit was generated by cvs2svn to compensate for changes in r327,
which included commits to RCS files with non-trunk default branches.


# 327 25-Aug-1993 jkh

The release version of my package install suite. Please see man pages
for info.