Welcome to version 20060405.

pkg_add also check for USE_ABI_DEPENDS.

Check if USE_ABI_DEPENDS or IGNORE_RECOMMENDED was set
when this package was built. IGNORE_RECOMMENDED is now historical.

For the cat man page, I manually made it say "pkgsrc" instead of
"NetBSD".

I committed to NetBSD's src/usr.sbin/pkg_install/ first :)
This commit is contained in:
reed 2006-04-06 06:49:30 +00:00
parent d348169c00
commit 295b6a402f
5 changed files with 27 additions and 18 deletions

View file

@ -1,4 +1,4 @@
/* $NetBSD: perform.c,v 1.39 2006/04/04 06:24:39 wiz Exp $ */
/* $NetBSD: perform.c,v 1.40 2006/04/06 06:49:30 reed Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
__RCSID("$NetBSD: perform.c,v 1.39 2006/04/04 06:24:39 wiz Exp $");
__RCSID("$NetBSD: perform.c,v 1.40 2006/04/06 06:49:30 reed Exp $");
#endif
#endif
@ -157,6 +157,8 @@ read_buildinfo(char **buildinfo)
buildinfo[BI_MACHINE_ARCH] = strdup(line);
else if (strcmp(key, "IGNORE_RECOMMENDED") == 0)
buildinfo[BI_IGNORE_RECOMMENDED] = strdup(line);
else if (strcmp(key, "USE_ABI_DEPENDS") == 0)
buildinfo[BI_USE_ABI_DEPENDS] = strdup(line);
}
}
(void) fclose(fp);
@ -471,12 +473,15 @@ pkg_do(const char *pkg, lpkg_head_t *pkgs)
}
}
/* Check if IGNORE_RECOMMENDED was set when this package was built. */
/* Check if USE_ABI_DEPENDS or IGNORE_RECOMMENDED was set
* when this package was built. IGNORE_RECOMMENDED is historical. */
if (buildinfo[BI_IGNORE_RECOMMENDED] != NULL &&
strcasecmp(buildinfo[BI_IGNORE_RECOMMENDED], "NO") != 0) {
if ((buildinfo[BI_USE_ABI_DEPENDS] != NULL &&
strcasecmp(buildinfo[BI_USE_ABI_DEPENDS], "YES") != 0) ||
(buildinfo[BI_IGNORE_RECOMMENDED] != NULL &&
strcasecmp(buildinfo[BI_IGNORE_RECOMMENDED], "NO") != 0)) {
warnx("%s was built", pkg);
warnx("\t to ignore recommended dependencies, this may cause problems!\n");
warnx("\tto ignore recommended ABI dependencies, this may cause problems!\n");
}
/*

View file

@ -1,4 +1,4 @@
.\" $NetBSD: pkg_add.1,v 1.16 2005/11/05 13:20:09 wiz Exp $
.\" $NetBSD: pkg_add.1,v 1.17 2006/04/06 06:49:30 reed Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@ -17,7 +17,7 @@
.\"
.\" @(#)pkg_add.1
.\"
.Dd November 1, 2005
.Dd April 3, 2006
.Dt PKG_ADD 1
.Os
.Sh NAME
@ -401,8 +401,10 @@ flag.
The package build information from
.Pa +BUILD_INFO
is then checked for
.Ev IGNORE_RECOMMENDED .
If the package was built with dependency recommendations ignored,
.Ev USE_ABI_DEPENDS=NO
(or
.Ev IGNORE_RECOMMENDED).
If the package was built with ABI dependency recommendations ignored,
a warning will be issued.
.It
If the package contains a

View file

@ -1,4 +1,4 @@
PKG_ADD(1) NetBSD General Commands Manual PKG_ADD(1)
PKG_ADD(1) General Commands Manual PKG_ADD(1)
NNAAMMEE
ppkkgg__aadddd -- a utility for installing and upgrading software package dis-
@ -222,8 +222,9 @@ TTEECCHHNNIICCAALL DDEETTAAIILLSS
is overridable with the --ff flag.
7. The package build information from _+_B_U_I_L_D___I_N_F_O is then checked
for IGNORE_RECOMMENDED. If the package was built with depen-
dency recommendations ignored, a warning will be issued.
for USE_ABI_DEPENDS=NO (or IGNORE_RECOMMENDED). If the package
was built with ABI dependency recommendations ignored, a warn-
ing will be issued.
8. If the package contains a _r_e_q_u_i_r_e script (see pkg_create(1)),
it is executed with the following arguments:
@ -387,4 +388,4 @@ BBUUGGSS
Sure to be others.
NetBSD 3.0 November 1, 2005 NetBSD 3.0
pkgsrc April 3, 2006 pkgsrc

View file

@ -1,4 +1,4 @@
/* $NetBSD: lib.h,v 1.22 2006/04/04 06:32:59 wiz Exp $ */
/* $NetBSD: lib.h,v 1.23 2006/04/06 06:49:30 reed Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@ -229,7 +229,8 @@ typedef enum bi_ent_t {
BI_OS_VERSION, /* 1 */
BI_MACHINE_ARCH, /* 2 */
BI_IGNORE_RECOMMENDED, /* 3 */
BI_ENUM_COUNT /* 4 */
BI_USE_ABI_DEPENDS, /* 4 */
BI_ENUM_COUNT /* 5 */
} bi_ent_t;
/* Types */

View file

@ -1,4 +1,4 @@
/* $NetBSD: version.h,v 1.56 2006/04/04 06:38:29 wiz Exp $ */
/* $NetBSD: version.h,v 1.57 2006/04/06 06:49:30 reed Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@ -33,6 +33,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
#define PKGTOOLS_VERSION "20060404"
#define PKGTOOLS_VERSION "20060405"
#endif /* _INST_LIB_VERSION_H_ */