diff options
author | krion <krion@FreeBSD.org> | 2005-06-14 15:05:43 +0000 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2005-06-14 15:05:43 +0000 |
commit | bf5c726c0643f6abae6cdb42fe1ead8dd9815993 (patch) | |
tree | 764bad44eecfeeab4b24776c379e71db81e64c08 | |
parent | 92159568b42d8e1fea5ab9bd5a033cc8468a511f (diff) | |
download | FreeBSD-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)
-rw-r--r-- | usr.sbin/pkg_install/add/extract.c | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_install/create/pkg_create.1 | 10 | ||||
-rw-r--r-- | usr.sbin/pkg_install/info/show.c | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_install/lib/lib.h | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_install/lib/plist.c | 6 |
5 files changed, 24 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/add/extract.c b/usr.sbin/pkg_install/add/extract.c index 86a9805..2085f3d 100644 --- a/usr.sbin/pkg_install/add/extract.c +++ b/usr.sbin/pkg_install/add/extract.c @@ -261,7 +261,8 @@ extract_plist(const char *home, Package *pkg) Group = p->name; break; - case PLIST_COMMENT: + case PLIST_COMMENT: /* FALLTHROUGH */ + case PLIST_NOINST: break; case PLIST_IGNORE: diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1 index 14bf58f..1337ee9 100644 --- a/usr.sbin/pkg_install/create/pkg_create.1 +++ b/usr.sbin/pkg_install/create/pkg_create.1 @@ -472,6 +472,16 @@ Imbed a comment in the packing list. Useful in trying to document some particularly hairy sequence that may trip someone up later. +.It Cm @noinst Ar option Ar file +Specify that the package would have installed +.Pa file +if +.Pa option +had been specified at build time. The action of +.Cm @noinst +is the same that +.Cm @comment +(which is doing nothing, it is just additional information). .It Cm @ignore Used internally to tell extraction to ignore the next file (do not copy it anywhere), as it is used for some special purpose. diff --git a/usr.sbin/pkg_install/info/show.c b/usr.sbin/pkg_install/info/show.c index 10f846a..5dd5878 100644 --- a/usr.sbin/pkg_install/info/show.c +++ b/usr.sbin/pkg_install/info/show.c @@ -140,6 +140,10 @@ show_plist(const char *title, Package *plist, plist_t type, Boolean showall) printf(Quiet ? "@comment %s\n" : "\tComment: %s\n", p->name); break; + case PLIST_NOINST: + printf(Quiet ? "@noinst %s\n" : "\tNot installed: %s\n", p->name); + break; + case PLIST_IGNORE: ign = TRUE; break; 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); |