 |
|
| |
PKG_REPLACE(1) |
FreeBSD General Commands Manual |
PKG_REPLACE(1) |
pkg_replace — a
utility for upgrading installed packages
pkg_replace |
[-abBcCddfFhiJknNOpPPqrRRuUvVwW ]
[--all ] [--automatic ]
[--batch ]
[--backup-package |
--no-backup-package ]
[--clean | --no-clean ]
[--cleanup | --no-cleanup ]
[--cleandeps |
--no-cleandeps ] [--config
| --no-config ]
[--force-config |
--no-force-config ]
[--debug ] [--makedb ]
[--no-backup ]
[--no-configfile ]
[--vebose | --no-verbose ]
[--version ] [-j
jobs] [-l
file] [-L
prefix] [-m
make_args] [-M
make_env] [-t
make_target] [-x
pkgname] [-X
pkgname]
[[pkgname[=package]]
[package] [glob]
[pkgorigin] ...] |
The pkg_replace command is used to upgrade
installed packages.
The following options are supported:
-a ,
--all
- Do with all the installed packages.
--automatic
- Set automatic flag for the package. This affects the operation of
pkg-autoremove(8).
-b ,
--backup-package
- Keep backup packages of the old versions. By default, the created backup
package will be deleted after installation. See also,
--no-backup-package
-B ,
--no-backup
- Do not backup old packages before uninstall old packages.
--batch
- Run an upgrading process in a batch mode (with BATCH=yes).
-c ,
--config
- Do “
make config-conditional ” before
build. See also, --no-config .
-C ,
--force-config
- Do “
make config ” before build. See
also, --no-force-config .
--clean
- Do “
make clean ” before build. See
also, -w , --no-clean .
--cleandeps
- Clean files that record dependencies in the
PKG_REPLACE_DB_DIR. This option overrides
--no-cleandeps . By default,
pkg_replace do not clean files in the
PKG_REPLACE_DB_DIR. This option should be useful
when the dependencies of packages are new or modified. See also,
-dd , -RR .
--cleanup
- Do “
make clean ” after build. This is
the default. See also, -W ,
--no-cleanup .
-d ,
-R
- In addition to the specified packages, replace all packages that required
by those packages as well.
-dd ,
-RR
- Strictly checking dependencies more than
-d,
-R, e.g. build dependencies. However, this mode is
slow. So, pkg_replace creates files that record
dependencies in the PKG_REPLACE_DB_DIR directory to
run as fast as possible. See config file,
pkg_replace.conf.sample. If you set
--cleandeps , pkg_replace
clean these files in the PKG_REPLACE_DB_DIR.
This option may fail when there are dependency problems (e.g.,
packages have looped dependencies, packages removed the ports tree).
Especially, be careful when using -a option at
the same time.
--debug
- Debug mode. Execute with “
set -x ”
option.
-f
- Force to replace packages.
-F
- Fetch distfiles or packages, do not replace.
-h
- Show help and exit.
-i
- Turn on interactive mode.
-j
jobs
- Number of parallel jobs. Default value gets from `sysctl -n hw.ncpu`.
-J
- Do not install the target packages, but install the dependencies.
-k
- Force the upgrade of a package even if some of the requisite packages have
failed to upgrade in advance.
-l
FILE
- Save the results to FILE. By default,
pkg_replace does not save results.
-L
PREFIX
- Save the logs in the files that begins with
PREFIX.
-m
ARGS
- Specify arguments to append to each
make(1)
command. Please see section EXAMPLES.
--makedb
- Create files that record dependencies of packages in the
PKG_REPLACE_DB_DIR.
-M
ARGS
- Specify arguments to prepend to each
make(1)
command.
-n
- Do not actually replace any packages.
--no-backup-package
- Do not keep backup packages the old versions. Override
-b .
--no-cleandeps
- Do not clean the PKG_REPLACE_DB_DIR. This is the
default. See also,
-dd ,
-RR .
--no-configfile
- Do not read the configuration file
pkg_replace.conf.
--no-config
- Do not “
make config-conditional ”
bofore build. Override --config .
--no-force-config
- Do not “
make config ” bofore build.
Override --force-config .
--no-verbose
- Turn off verbose output. Override
-v ,
--verbose .
-N
- Install new packages, do not replace.
-O
- Do not check the dependencies before building the target packages.
-p
- Do “
make package ”.
-P
- Use binary packages instead of installing from source.
pkg_replace finds them from the directory
specified by PKGREPOSITORY, and the remote site
specified by PACKAGEROOT.
-PP
- Be forced to use binary packages. Never use the port even if a package is
not available either locally or remotely.
-r
- In addition to the specified packages, replace all packages that depend on
those packages as well.
-t
make_target
- Do “
make make_target ” only.
-U
- Unlock packages before deinstall packages and lock packages again after
install.
-u
- Do not preserve old shared libraries. By default,
pkg_replace preserves old shared libraries in
PKGCOMPATDIR. But if the new library and the old
library have the same name, the old library is removed from
PKGCOMPATDIR.
-v ,
--verbose
- Turn on verbose output.
-V
- List the installed packages that need updating.
--version
- Print pkg_replace version.
-w ,
--no-clean
- Do not “
make clean ” before each
build. This is the default. See also, --clean
-W ,
--no-cleanup
- Do not “
make clean ” after each
installation. See also, --cleanup
-x
glob
- Do not replace packages matching the specified glob pattern.
-X
glob
- Remove the libraries in PKGCOMPATDIR, when the
specified packages have the libraries with the same name as the one in
PKGCOMPATDIR. This may be useful when there are
errors due to a mixture of old and new libraries.
See also, pkg_replace.conf.
- PACKAGEROOT
- Default is https://pkg.FreeBSD.org.
- PKGCOMPATDIR
- Defaut location is %%PKGCOMPATDIR%%.
- PKGREPOSITORY
- Default location is /var/cache/pkg/All.
- PKG_REPLACE_DB_DIR
- Default location is /var/db/pkg_replace.
- pkgname and glob examples: name-version,
name and shell glob.
glib-2.36.3_2, glib and 'glib*'
or glib\*
- pkgorigin examples: pkgorigin and
pkgorigin@flavor.
devel/glib20 and
graphics/py-cairo@py37
- Path: Absolute and relative paths are allowed.
pkg_replace
glib=../glib20-new
or
pkg_replace
glib=/home/foo/ports/glib20
- Install glib:
pkg_replace -N
devel/glib20
- Install py-cairo with
FLAVOR=py37:
pkg_replace -N
graphics/py-cairo@py37
- Replace glib:
pkg_replace glib
- Replace perl and all packages that depend on it:
pkg_replace -r perl
- If the xterm package is already installed, replace
it with xterm-220:
pkg_replace
/usr/ports/packages/All/xterm-220.tbz
- Replace XFree86-libraries with
/usr/ports/x11/xorg-libraries:
pkg_replace
XFree86-libraries=/usr/ports/x11/xorg-libraries
- Replace XFree86-libraries with pkgorigin:
x11/xorg-libraries:
pkg_replace
XFree86-libraries=x11/xorg-libraries
- Replace XFree86-libraries with
/var/tmp/xorg-libraries-6.9.0 package:
pkg_replace
XFree86-libraries=/var/tmp/xorg-libraries-6.9.0.tbz
- Replace graphics/py-cairo with
FLAVOR=py37:
pkg_replace -m FLAVOR=py37
graphics/py-cairo
or
pkg_replace
graphics/py-cairo@py37
- Do “
make configure ” only:
pkg_replace -t configure
pkgname
The
portupgrade(1)
options -A , -B ,
-D , -e ,
-o , -q ,
-s , -S and
-y are no longer supported.
Securedog
⟨securedog@users.sourceforge.jp⟩
Ken DEGUCHI
⟨kdeguchi@sz.tokoha-u.ac.jp⟩
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc.
|