summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/lib
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2005-06-14 15:05:43 +0000
committerkrion <krion@FreeBSD.org>2005-06-14 15:05:43 +0000
commitbf5c726c0643f6abae6cdb42fe1ead8dd9815993 (patch)
tree764bad44eecfeeab4b24776c379e71db81e64c08 /usr.sbin/pkg_install/lib
parent92159568b42d8e1fea5ab9bd5a033cc8468a511f (diff)
downloadFreeBSD-src-bf5c726c0643f6abae6cdb42fe1ead8dd9815993.zip
FreeBSD-src-bf5c726c0643f6abae6cdb42fe1ead8dd9815993.tar.gz
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)
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r--usr.sbin/pkg_install/lib/lib.h3
-rw-r--r--usr.sbin/pkg_install/lib/plist.c6
2 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h
index 80dc1e0..cdbfe00 100644
--- a/usr.sbin/pkg_install/lib/lib.h
+++ b/usr.sbin/pkg_install/lib/lib.h
@@ -108,7 +108,8 @@ enum _plist_t {
PLIST_CHOWN, PLIST_CHGRP, PLIST_COMMENT, PLIST_IGNORE,
PLIST_NAME, PLIST_UNEXEC, PLIST_SRC, PLIST_DISPLAY,
PLIST_PKGDEP, PLIST_CONFLICTS, PLIST_MTREE, PLIST_DIR_RM,
- PLIST_IGNORE_INST, PLIST_OPTION, PLIST_ORIGIN, PLIST_DEPORIGIN
+ PLIST_IGNORE_INST, PLIST_OPTION, PLIST_ORIGIN, PLIST_DEPORIGIN,
+ PLIST_NOINST
};
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 95d9ac4..8ab0535 100644
--- a/usr.sbin/pkg_install/lib/plist.c
+++ b/usr.sbin/pkg_install/lib/plist.c
@@ -222,6 +222,8 @@ plist_cmd(const char *s, char **arg)
return PLIST_CHOWN;
else if (!strcmp(cmd, "group"))
return PLIST_CHGRP;
+ else if (!strcmp(cmd, "noinst"))
+ return PLIST_NOINST;
else if (!strcmp(cmd, "comment")) {
if (!strncmp(*arg, "ORIGIN:", 7)) {
*arg += 7;
@@ -349,6 +351,10 @@ write_plist(Package *pkg, FILE *fp)
fprintf(fp, "%ccomment %s\n", CMD_CHAR, plist->name);
break;
+ case PLIST_NOINST:
+ fprintf(fp, "%cnoinst %s\n", CMD_CHAR, plist->name);
+ break;
+
case PLIST_IGNORE:
case PLIST_IGNORE_INST: /* a one-time non-ignored file */
fprintf(fp, "%cignore\n", CMD_CHAR);
OpenPOWER on IntegriCloud