pkgsrc-Changes-HG archive

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

[pkgsrc/pkg_install-renovation]: pkgsrc/pkgtools/pkg_install/files Push init ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a25a6d27951a
branches:  pkg_install-renovation
changeset: 541593:a25a6d27951a
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sun Aug 10 22:08:16 2008 +0000

description:
Push init of plist into read_plist.

diffstat:

 pkgtools/pkg_install/files/add/perform.c    |  5 ++---
 pkgtools/pkg_install/files/admin/check.c    |  5 ++---
 pkgtools/pkg_install/files/admin/main.c     |  5 ++---
 pkgtools/pkg_install/files/create/perform.c |  5 ++---
 pkgtools/pkg_install/files/delete/perform.c |  8 ++------
 pkgtools/pkg_install/files/lib/conflicts.c  |  6 ++----
 pkgtools/pkg_install/files/lib/plist.c      |  7 +++++--
 7 files changed, 17 insertions(+), 24 deletions(-)

diffs (188 lines):

diff -r 16a6e68edba5 -r a25a6d27951a pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c  Wed Aug 06 23:51:32 2008 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c  Sun Aug 10 22:08:16 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: perform.c,v 1.70.4.17 2008/08/05 22:56:24 joerg Exp $  */
+/*     $NetBSD: perform.c,v 1.70.4.18 2008/08/10 22:08:16 joerg Exp $  */
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -6,7 +6,7 @@
 #if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
 #endif
-__RCSID("$NetBSD: perform.c,v 1.70.4.17 2008/08/05 22:56:24 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.70.4.18 2008/08/10 22:08:16 joerg Exp $");
 
 /*-
  * Copyright (c) 2003 Grant Beattie <grant%NetBSD.org@localhost>
@@ -413,7 +413,6 @@
                        fclose(f);
                        return -1;
                }
-               plist.head = plist.tail = NULL;
                read_plist(&plist, f_pkg);
                fclose(f_pkg);
                for (p = plist.head; p != NULL; p = p->next) {
diff -r 16a6e68edba5 -r a25a6d27951a pkgtools/pkg_install/files/admin/check.c
--- a/pkgtools/pkg_install/files/admin/check.c  Wed Aug 06 23:51:32 2008 +0000
+++ b/pkgtools/pkg_install/files/admin/check.c  Sun Aug 10 22:08:16 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: check.c,v 1.2.4.3 2008/08/02 20:33:50 joerg Exp $      */
+/*     $NetBSD: check.c,v 1.2.4.4 2008/08/10 22:08:16 joerg Exp $      */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #endif
 #ifndef lint
-__RCSID("$NetBSD: check.c,v 1.2.4.3 2008/08/02 20:33:50 joerg Exp $");
+__RCSID("$NetBSD: check.c,v 1.2.4.4 2008/08/10 22:08:16 joerg Exp $");
 #endif
 
 /*-
@@ -98,7 +98,6 @@
                err(EXIT_FAILURE, "can't open %s", content);
        free(content);
 
-       Plist.head = Plist.tail = NULL;
        read_plist(&Plist, f);
        p = find_plist(&Plist, PLIST_NAME);
        if (p == NULL)
diff -r 16a6e68edba5 -r a25a6d27951a pkgtools/pkg_install/files/admin/main.c
--- a/pkgtools/pkg_install/files/admin/main.c   Wed Aug 06 23:51:32 2008 +0000
+++ b/pkgtools/pkg_install/files/admin/main.c   Sun Aug 10 22:08:16 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.42.2.6 2008/08/02 20:33:50 joerg Exp $      */
+/*     $NetBSD: main.c,v 1.42.2.7 2008/08/10 22:08:16 joerg Exp $      */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #endif
 #ifndef lint
-__RCSID("$NetBSD: main.c,v 1.42.2.6 2008/08/02 20:33:50 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.42.2.7 2008/08/10 22:08:16 joerg Exp $");
 #endif
 
 /*-
@@ -149,7 +149,6 @@
                errx(EXIT_FAILURE, "%s: can't open `%s'", pkgdir, CONTENTS_FNAME);
        free(contents);
 
-       Plist.head = Plist.tail = NULL;
        read_plist(&Plist, f);
        if ((p = find_plist(&Plist, PLIST_NAME)) == NULL) {
                errx(EXIT_FAILURE, "Package `%s' has no @name, aborting.", pkgdir);
diff -r 16a6e68edba5 -r a25a6d27951a pkgtools/pkg_install/files/create/perform.c
--- a/pkgtools/pkg_install/files/create/perform.c       Wed Aug 06 23:51:32 2008 +0000
+++ b/pkgtools/pkg_install/files/create/perform.c       Sun Aug 10 22:08:16 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: perform.c,v 1.19.2.2 2008/08/02 20:33:50 joerg Exp $   */
+/*     $NetBSD: perform.c,v 1.19.2.3 2008/08/10 22:08:16 joerg 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.38 1997/10/13 15:03:51 jkh Exp";
 #else
-__RCSID("$NetBSD: perform.c,v 1.19.2.2 2008/08/02 20:33:50 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.19.2.3 2008/08/10 22:08:16 joerg Exp $");
 #endif
 #endif
 
@@ -171,7 +171,6 @@
                if (!pkg_in)
                        errx(2, "unable to open contents file '%s' for input", Contents);
        }
-       plist.head = plist.tail = NULL;
 
        /* If a SrcDir override is set, add it now */
        if (SrcDir) {
diff -r 16a6e68edba5 -r a25a6d27951a pkgtools/pkg_install/files/delete/perform.c
--- a/pkgtools/pkg_install/files/delete/perform.c       Wed Aug 06 23:51:32 2008 +0000
+++ b/pkgtools/pkg_install/files/delete/perform.c       Sun Aug 10 22:08:16 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: perform.c,v 1.23.2.10 2008/08/05 22:56:24 joerg Exp $  */
+/*     $NetBSD: perform.c,v 1.23.2.11 2008/08/10 22:08:16 joerg 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.15 1997/10/13 15:03:52 jkh Exp";
 #else
-__RCSID("$NetBSD: perform.c,v 1.23.2.10 2008/08/05 22:56:24 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.23.2.11 2008/08/10 22:08:16 joerg Exp $");
 #endif
 #endif
 
@@ -447,10 +447,6 @@
                /* remove a direct req from our queue */
                TAILQ_REMOVE(&reqq, lpp, lp_link);
 
-               /* Reset some state */
-               rPlist.head = NULL;
-               rPlist.tail = NULL;
-
                /* prepare for recursion */
                best_installed = find_best_matching_installed_pkg(lpp->lp_name);
 
diff -r 16a6e68edba5 -r a25a6d27951a pkgtools/pkg_install/files/lib/conflicts.c
--- a/pkgtools/pkg_install/files/lib/conflicts.c        Wed Aug 06 23:51:32 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/conflicts.c        Sun Aug 10 22:08:16 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conflicts.c,v 1.4.6.3 2008/08/06 12:58:22 joerg Exp $  */
+/*     $NetBSD: conflicts.c,v 1.4.6.4 2008/08/10 22:08:16 joerg Exp $  */
 
 /*-
  * Copyright (c) 2007 Roland Illig <rillig%NetBSD.org@localhost>.
@@ -48,7 +48,7 @@
 #include <sys/cdefs.h>
 #endif
 
-__RCSID("$NetBSD: conflicts.c,v 1.4.6.3 2008/08/06 12:58:22 joerg Exp $");
+__RCSID("$NetBSD: conflicts.c,v 1.4.6.4 2008/08/10 22:08:16 joerg Exp $");
 
 #if HAVE_ERR_H
 #include <err.h>
@@ -102,8 +102,6 @@
                return 0;
 
        rv = 0;
-       pkg.head = NULL;
-       pkg.tail = NULL;
 
        f = fopen_contents(pkgname, "r");
        read_plist(&pkg, f);
diff -r 16a6e68edba5 -r a25a6d27951a pkgtools/pkg_install/files/lib/plist.c
--- a/pkgtools/pkg_install/files/lib/plist.c    Wed Aug 06 23:51:32 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/plist.c    Sun Aug 10 22:08:16 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: plist.c,v 1.17.4.7 2008/08/05 22:56:24 joerg Exp $     */
+/*     $NetBSD: plist.c,v 1.17.4.8 2008/08/10 22:08:17 joerg Exp $     */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -11,7 +11,7 @@
 #if 0
 static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp";
 #else
-__RCSID("$NetBSD: plist.c,v 1.17.4.7 2008/08/05 22:56:24 joerg Exp $");
+__RCSID("$NetBSD: plist.c,v 1.17.4.8 2008/08/10 22:08:17 joerg Exp $");
 #endif
 #endif
 
@@ -358,6 +358,9 @@
        int     len;
        int     free_cp;
 
+       pkg->head = NULL;
+       pkg->tail = NULL;
+
        while (fgets(pline, MaxPathSize, fp) != (char *) NULL) {
                for (len = strlen(pline); len &&
                    isspace((unsigned char) pline[len - 1]);) {



Home | Main Index | Thread Index | Old Index