pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files Update pkg_install to 20040...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e4a5a1e424df
branches:  trunk
changeset: 472522:e4a5a1e424df
user:      rh <rh%pkgsrc.org@localhost>
date:      Sun Apr 11 06:56:11 2004 +0000

description:
Update pkg_install to 20040411, pulling up the changes in the NetBSD source
tree:

Make pkg_add recognise binary packages built with ignored recommendations
(IGNORE_RECOMMENDED set in the presence of RECOMMENDED pre-requisites).
This change is fully backward-compatible: binary packages have set the
corresponding BUILD_INFO since RECOMMENDED was implemented.  Packages
built before that time will install as before.
Bump PKGTOOLS_VERSION to 20040411.
This closes PR pkg/24712 by Thomas Klausner.

diffstat:

 pkgtools/pkg_install/files/README           |   6 ++--
 pkgtools/pkg_install/files/add/perform.c    |  31 ++++++++++++++++++++++++++--
 pkgtools/pkg_install/files/add/pkg_add.1    |  14 ++++++++++++-
 pkgtools/pkg_install/files/add/pkg_add.cat1 |  24 ++++++++++++++--------
 pkgtools/pkg_install/files/lib/lib.h        |   5 ++-
 pkgtools/pkg_install/files/lib/version.h    |   4 +-
 6 files changed, 64 insertions(+), 20 deletions(-)

diffs (232 lines):

diff -r e9baf3700999 -r e4a5a1e424df pkgtools/pkg_install/files/README
--- a/pkgtools/pkg_install/files/README Sun Apr 11 05:59:14 2004 +0000
+++ b/pkgtools/pkg_install/files/README Sun Apr 11 06:56:11 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: README,v 1.4 2003/10/29 23:00:27 jlam Exp $
+# $NetBSD: README,v 1.5 2004/04/11 06:56:11 rh Exp $
 # Original from FreeBSD, no rcs id.
 
 This is the pkg_install suite of tools for doing maintainance of
@@ -11,8 +11,8 @@
 of dozen features on top.  Whee! :-)
 
 In another round of enhancements, NetBSD changes were added by
-Alistair Crooks, Hubert Feyrer, Thorsten Frueauf, Christian E. Hopps,
-Thomas Klausner, Johnny Lam, and Matthias Scheler.
+Alistair Crooks, Hubert Feyrer, Thorsten Frueauf, Rene Hexel,
+Christian E. Hopps, Thomas Klausner, Johnny Lam, and Matthias Scheler.
 
 When making snapshots, please modify PKGTOOLS_VERSION in lib/version.h
 to that day's date.
diff -r e9baf3700999 -r e4a5a1e424df pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c  Sun Apr 11 05:59:14 2004 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c  Sun Apr 11 06:56:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: perform.c,v 1.19 2004/04/09 18:38:12 tv Exp $  */
+/*     $NetBSD: perform.c,v 1.20 2004/04/11 06:56:11 rh Exp $  */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -11,7 +11,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.19 2004/04/09 18:38:12 tv Exp $");
+__RCSID("$NetBSD: perform.c,v 1.20 2004/04/11 06:56:11 rh Exp $");
 #endif
 #endif
 
@@ -51,6 +51,9 @@
 #if HAVE_STRING_H
 #include <string.h>
 #endif
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
 #if HAVE_SYS_UTSNAME_H
 #include <sys/utsname.h>
 #endif
@@ -326,6 +329,23 @@
                }
        }
 
+       /* Check if IGNORE_RECOMMENDED was set when this package was built. */
+
+       if (buildinfo[BI_IGNORE_RECOMMENDED] != NULL &&
+           strcasecmp(buildinfo[BI_IGNORE_RECOMMENDED], "NO") != 0) {
+               warnx("Package `%s' has", pkg);
+               warnx("IGNORE_RECOMMENDED set: This package was built with");
+               warnx("dependency recommendations ignored.  It may have been");
+               warnx("built against a set of installed packages that is");
+               warnx("different from the recommended set of pre-requisites.");
+               warnx("As a cconsequence, this package may not work on this");
+               warnx("or other systems with a different set of packages.");
+               if (!Force && !getenv("PKG_IGNORE_RECOMMENDED")) {
+                           warnx("aborting.");
+                           goto bomb;
+               }
+       }
+
        /*
          * If we have a prefix, delete the first one we see and add this
          * one in place of it.
@@ -966,7 +986,10 @@
                if (line[0] == ' ')
                        line += sizeof(char);
 
-               /* we only care about opsys, arch and version */
+               /*
+                * we only care about opsys, arch, version, and
+                * dependency recommendations
+                */
                if (line[0] != '\0') {
                        if (strcmp(key, "OPSYS") == 0)
                            buildinfo[BI_OPSYS] = strdup(line);
@@ -974,6 +997,8 @@
                            buildinfo[BI_OS_VERSION] = strdup(line);
                        else if (strcmp(key, "MACHINE_ARCH") == 0)
                            buildinfo[BI_MACHINE_ARCH] = strdup(line);
+                       else if (strcmp(key, "IGNORE_RECOMMENDED") == 0)
+                           buildinfo[BI_IGNORE_RECOMMENDED] = strdup(line);
                }
        }
        if (buildinfo[BI_OPSYS] == NULL ||
diff -r e9baf3700999 -r e4a5a1e424df pkgtools/pkg_install/files/add/pkg_add.1
--- a/pkgtools/pkg_install/files/add/pkg_add.1  Sun Apr 11 05:59:14 2004 +0000
+++ b/pkgtools/pkg_install/files/add/pkg_add.1  Sun Apr 11 06:56:11 2004 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_add.1,v 1.7 2003/12/20 04:23:05 grant Exp $
+.\" $NetBSD: pkg_add.1,v 1.8 2004/04/11 06:56:11 rh Exp $
 .\"
 .\" FreeBSD install - a package for the installation and maintenance
 .\" of non-core utilities.
@@ -370,6 +370,18 @@
 .Fl f
 flag.
 .It
+The package build information from
+.Pa +BUILD_INFO
+is then checked for
+.Ev IGNORE_RECOMMENDED .
+If the package was built with dependency recommendations ignored,
+installation will be aborted.
+This behavior is overridable with the
+.Fl f
+flag and the
+.Ev PKG_IGNORE_RECOMMENDED
+environment variable.
+.It
 If the package contains a
 .Ar require
 script (see
diff -r e9baf3700999 -r e4a5a1e424df pkgtools/pkg_install/files/add/pkg_add.cat1
--- a/pkgtools/pkg_install/files/add/pkg_add.cat1       Sun Apr 11 05:59:14 2004 +0000
+++ b/pkgtools/pkg_install/files/add/pkg_add.cat1       Sun Apr 11 06:56:11 2004 +0000
@@ -207,7 +207,13 @@
                 from that of the host, installation is aborted.  This behavior
                 is overridable with the --ff flag.
 
-           7.   If the package contains a _r_e_q_u_i_r_e script (see pkg_create(1)),
+           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, installation will be aborted.
+                This behavior is overridable with the --ff flag and the
+                PKG_IGNORE_RECOMMENDED environment variable.
+
+           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:
 
                 _p_k_g_-_n_a_m_e      The name of the package being installed
@@ -220,7 +226,7 @@
                 If the _r_e_q_u_i_r_e script exits with a non-zero status code, the
                 installation is terminated.
 
-           8.   If the package contains an _i_n_s_t_a_l_l script, it is executed with
+           9.   If the package contains an _i_n_s_t_a_l_l script, it is executed with
                 the following arguments:
 
                 _p_k_g_-_n_a_m_e      The name of the package being installed.
@@ -232,19 +238,19 @@
                 If the _i_n_s_t_a_l_l script exits with a non-zero status code, the
                 installation is terminated.
 
-           9.   If @@ooppttiioonn eexxttrraacctt--iinn--ppllaaccee is not present in the packing
+           10.  If @@ooppttiioonn eexxttrraacctt--iinn--ppllaaccee is not present in the packing
                 list, then it is used as a guide for moving (or copying, as
                 necessary) files from the staging area into their final loca-
                 tions.
 
-           10.  If the package contains an _m_t_r_e_e_f_i_l_e file (see pkg_create(1)),
+           11.  If the package contains an _m_t_r_e_e_f_i_l_e file (see pkg_create(1)),
                 then mtree is invoked as:
                       mmttrreeee --uu --ff _m_t_r_e_e_f_i_l_e --dd --ee --pp _p_r_e_f_i_x
                 where _p_r_e_f_i_x is either the prefix specified with the --pp flag
                 or, if no --pp flag was specified, the name of the first direc-
                 tory named by a @@ccwwdd directive within this package.
 
-           11.  If an _i_n_s_t_a_l_l script exists for the package, it is executed
+           12.  If an _i_n_s_t_a_l_l script exists for the package, it is executed
                 with the following arguments:
 
                 _p_k_g___n_a_m_e      The name of the package being installed.
@@ -253,7 +259,7 @@
                               any actions needed after the package has been
                               installed.
 
-           12.  After installation is complete, a copy of the packing list,
+           13.  After installation is complete, a copy of the packing list,
                 _d_e_i_n_s_t_a_l_l script, description, and display files are copied
                 into _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_> for subsequent possible use by
                 pkg_delete(1).  Any package dependencies are recorded in the
@@ -261,12 +267,12 @@
                 an alternate package database directory is specified, then it
                 overrides the _/_v_a_r_/_d_b_/_p_k_g path shown above).
 
-           13.  If the package is a depoted package, then add it to the
+           14.  If the package is a depoted package, then add it to the
                 default view.
 
-           14.  The staging area is deleted and the program terminates.
+           15.  The staging area is deleted and the program terminates.
 
-           15.  Finally, if we were upgrading a package, any _+_R_E_Q_U_I_R_E_D___B_Y file
+           16.  Finally, if we were upgrading a package, any _+_R_E_Q_U_I_R_E_D___B_Y file
                 that was moved aside before upgrading was started is now moved
                 back into place.
 
diff -r e9baf3700999 -r e4a5a1e424df pkgtools/pkg_install/files/lib/lib.h
--- a/pkgtools/pkg_install/files/lib/lib.h      Sun Apr 11 05:59:14 2004 +0000
+++ b/pkgtools/pkg_install/files/lib/lib.h      Sun Apr 11 06:56:11 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.10 2004/04/09 18:38:12 tv Exp $ */
+/* $NetBSD: lib.h,v 1.11 2004/04/11 06:56:11 rh Exp $ */
 
 /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
 
@@ -198,7 +198,8 @@
        BI_OPSYS,               /*  0 */
        BI_OS_VERSION,          /*  1 */
        BI_MACHINE_ARCH,        /*  2 */
-       BI_ENUM_COUNT,          /*  3 */
+       BI_IGNORE_RECOMMENDED,  /*  3 */
+       BI_ENUM_COUNT,          /*  4 */
 }      bi_ent_t;
 
 /* Types */
diff -r e9baf3700999 -r e4a5a1e424df pkgtools/pkg_install/files/lib/version.h
--- a/pkgtools/pkg_install/files/lib/version.h  Sun Apr 11 05:59:14 2004 +0000
+++ b/pkgtools/pkg_install/files/lib/version.h  Sun Apr 11 06:56:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.25 2004/04/09 18:38:12 tv Exp $  */
+/*     $NetBSD: version.h,v 1.26 2004/04/11 06:56:11 rh 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 "20040409"
+#define PKGTOOLS_VERSION "20040411"
 
 #endif /* _INST_LIB_VERSION_H_ */



Home | Main Index | Thread Index | Old Index