diff options
author | kris <kris@FreeBSD.org> | 2003-04-17 09:56:05 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2003-04-17 09:56:05 +0000 |
commit | 7ec422366401f961c808e40fd6b4c95c955ea58f (patch) | |
tree | 8cc602fa2181b3251a7557cd50f7b5898169f909 /usr.sbin/pkg_install/lib | |
parent | 52a551e4c5e52ca9df95a65b82e6e31e39f27648 (diff) | |
download | FreeBSD-src-7ec422366401f961c808e40fd6b4c95c955ea58f.zip FreeBSD-src-7ec422366401f961c808e40fd6b4c95c955ea58f.tar.gz |
* 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
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r-- | usr.sbin/pkg_install/lib/lib.h | 6 | ||||
-rw-r--r-- | usr.sbin/pkg_install/lib/plist.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h index ffb0e73..b7ca695 100644 --- a/usr.sbin/pkg_install/lib/lib.h +++ b/usr.sbin/pkg_install/lib/lib.h @@ -86,7 +86,7 @@ * Version of the package tools - increase only when some * functionality used by bsd.port.mk is changed, added or removed */ -#define PKG_INSTALL_VERSION 20020908 +#define PKG_INSTALL_VERSION 20030417 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) @@ -99,8 +99,8 @@ enum _plist_t { PLIST_FILE, PLIST_CWD, PLIST_CMD, PLIST_CHMOD, PLIST_CHOWN, PLIST_CHGRP, PLIST_COMMENT, PLIST_IGNORE, PLIST_NAME, PLIST_UNEXEC, PLIST_SRC, PLIST_DISPLAY, - PLIST_PKGDEP, PLIST_MTREE, PLIST_DIR_RM, PLIST_IGNORE_INST, - PLIST_OPTION, PLIST_ORIGIN, PLIST_DEPORIGIN + PLIST_PKGDEP, PLIST_CONFLICTS, PLIST_MTREE, PLIST_DIR_RM, + PLIST_IGNORE_INST, PLIST_OPTION, PLIST_ORIGIN, PLIST_DEPORIGIN }; typedef enum _plist_t plist_t; diff --git a/usr.sbin/pkg_install/lib/plist.c b/usr.sbin/pkg_install/lib/plist.c index 696e0f5..60bc111 100644 --- a/usr.sbin/pkg_install/lib/plist.c +++ b/usr.sbin/pkg_install/lib/plist.c @@ -241,6 +241,8 @@ plist_cmd(const char *s, char **arg) return PLIST_DISPLAY; else if (!strcmp(cmd, "pkgdep")) return PLIST_PKGDEP; + else if (!strcmp(cmd, "conflicts")) + return PLIST_CONFLICTS; else if (!strcmp(cmd, "mtree")) return PLIST_MTREE; else if (!strcmp(cmd, "dirrm")) @@ -364,6 +366,10 @@ write_plist(Package *pkg, FILE *fp) fprintf(fp, "%cpkgdep %s\n", CMD_CHAR, plist->name); break; + case PLIST_CONFLICTS: + fprintf(fp, "%cconflicts %s\n", CMD_CHAR, plist->name); + break; + case PLIST_MTREE: fprintf(fp, "%cmtree %s\n", CMD_CHAR, plist->name); break; |