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 pkg_install-20080916:
details: https://anonhg.NetBSD.org/pkgsrc/rev/afadab99c28d
branches: trunk
changeset: 547477:afadab99c28d
user: joerg <joerg%pkgsrc.org@localhost>
date: Wed Sep 17 15:21:30 2008 +0000
description:
pkg_install-20080916:
Merge from changes for read_plist from pkg_install-renovation to always
initialize the plist and add append_plist for the one case where this is
not desired. Fixes PR 39276.
diffstat:
pkgtools/pkg_install/files/add/perform.c | 6 ++----
pkgtools/pkg_install/files/admin/check.c | 5 ++---
pkgtools/pkg_install/files/admin/main.c | 5 ++---
pkgtools/pkg_install/files/create/perform.c | 6 +++---
pkgtools/pkg_install/files/delete/perform.c | 8 ++------
pkgtools/pkg_install/files/lib/conflicts.c | 2 --
pkgtools/pkg_install/files/lib/lib.h | 3 ++-
pkgtools/pkg_install/files/lib/plist.c | 15 ++++++++++++---
pkgtools/pkg_install/files/lib/version.h | 4 ++--
9 files changed, 27 insertions(+), 27 deletions(-)
diffs (224 lines):
diff -r d5edfd3ca04e -r afadab99c28d pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c Wed Sep 17 15:04:21 2008 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c Wed Sep 17 15:21:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.72 2008/04/26 17:40:01 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.73 2008/09/17 15:21:30 joerg 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.72 2008/04/26 17:40:01 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.73 2008/09/17 15:21:30 joerg Exp $");
#endif
#endif
@@ -278,8 +278,6 @@
plist_t *depp;
char depC[MaxPathSize];
- depPlist.head = depPlist.tail = NULL;
-
s = strrchr(pkg2chk, '\n');
if (s)
*s = '\0'; /* strip trailing '\n' */
diff -r d5edfd3ca04e -r afadab99c28d pkgtools/pkg_install/files/admin/check.c
--- a/pkgtools/pkg_install/files/admin/check.c Wed Sep 17 15:04:21 2008 +0000
+++ b/pkgtools/pkg_install/files/admin/check.c Wed Sep 17 15:21:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: check.c,v 1.4 2008/09/16 13:32:58 joerg Exp $ */
+/* $NetBSD: check.c,v 1.5 2008/09/17 15:21:30 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.4 2008/09/16 13:32:58 joerg Exp $");
+__RCSID("$NetBSD: check.c,v 1.5 2008/09/17 15:21:30 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 d5edfd3ca04e -r afadab99c28d pkgtools/pkg_install/files/admin/main.c
--- a/pkgtools/pkg_install/files/admin/main.c Wed Sep 17 15:04:21 2008 +0000
+++ b/pkgtools/pkg_install/files/admin/main.c Wed Sep 17 15:21:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.44 2008/09/16 13:32:58 joerg Exp $ */
+/* $NetBSD: main.c,v 1.45 2008/09/17 15:21:30 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.44 2008/09/16 13:32:58 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.45 2008/09/17 15:21:30 joerg Exp $");
#endif
/*-
@@ -147,7 +147,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 d5edfd3ca04e -r afadab99c28d pkgtools/pkg_install/files/create/perform.c
--- a/pkgtools/pkg_install/files/create/perform.c Wed Sep 17 15:04:21 2008 +0000
+++ b/pkgtools/pkg_install/files/create/perform.c Wed Sep 17 15:21:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.21 2008/04/26 17:40:01 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.22 2008/09/17 15:21:30 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.21 2008/04/26 17:40:01 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.22 2008/09/17 15:21:30 joerg Exp $");
#endif
#endif
@@ -177,7 +177,7 @@
}
/* Slurp in the packing list */
- read_plist(&plist, pkg_in);
+ append_plist(&plist, pkg_in);
if (pkg_in != stdin)
fclose(pkg_in);
diff -r d5edfd3ca04e -r afadab99c28d pkgtools/pkg_install/files/delete/perform.c
--- a/pkgtools/pkg_install/files/delete/perform.c Wed Sep 17 15:04:21 2008 +0000
+++ b/pkgtools/pkg_install/files/delete/perform.c Wed Sep 17 15:21:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.23 2008/04/23 20:54:39 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.24 2008/09/17 15:21:30 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 2008/04/23 20:54:39 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.24 2008/09/17 15:21:30 joerg Exp $");
#endif
#endif
@@ -492,10 +492,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 */
chdir(_pkgdb_getPKGDB_DIR());
if (ispkgpattern(lpp->lp_name)) {
diff -r d5edfd3ca04e -r afadab99c28d pkgtools/pkg_install/files/lib/conflicts.c
--- a/pkgtools/pkg_install/files/lib/conflicts.c Wed Sep 17 15:04:21 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/conflicts.c Wed Sep 17 15:21:30 2008 +0000
@@ -71,8 +71,6 @@
int rv;
rv = 0;
- pkg.head = NULL;
- pkg.tail = NULL;
f = fopen_contents(pkgname, "r");
read_plist(&pkg, f);
diff -r d5edfd3ca04e -r afadab99c28d pkgtools/pkg_install/files/lib/lib.h
--- a/pkgtools/pkg_install/files/lib/lib.h Wed Sep 17 15:04:21 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/lib.h Wed Sep 17 15:21:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.44 2008/04/26 17:40:01 joerg Exp $ */
+/* $NetBSD: lib.h,v 1.45 2008/09/17 15:21:30 joerg Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@@ -407,6 +407,7 @@
void stringify_plist(package_t *, char **, size_t *, char *);
void parse_plist(package_t *, const char *);
void read_plist(package_t *, FILE *);
+void append_plist(package_t *, FILE *);
int delete_package(Boolean, Boolean, package_t *, Boolean);
/* Package Database */
diff -r d5edfd3ca04e -r afadab99c28d pkgtools/pkg_install/files/lib/plist.c
--- a/pkgtools/pkg_install/files/lib/plist.c Wed Sep 17 15:04:21 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/plist.c Wed Sep 17 15:21:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: plist.c,v 1.20 2008/09/16 13:32:58 joerg Exp $ */
+/* $NetBSD: plist.c,v 1.21 2008/09/17 15:21:30 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.20 2008/09/16 13:32:58 joerg Exp $");
+__RCSID("$NetBSD: plist.c,v 1.21 2008/09/17 15:21:30 joerg Exp $");
#endif
#endif
@@ -360,7 +360,7 @@
* Read a packing list from a file
*/
void
-read_plist(package_t *pkg, FILE * fp)
+append_plist(package_t *pkg, FILE * fp)
{
char pline[MaxPathSize];
char *cp;
@@ -396,6 +396,15 @@
}
}
+void
+read_plist(package_t *pkg, FILE * fp)
+{
+ pkg->head = NULL;
+ pkg->tail = NULL;
+
+ append_plist(pkg, fp);
+}
+
/*
* Write a packing list to a file, converting commands to ASCII equivs
*/
diff -r d5edfd3ca04e -r afadab99c28d pkgtools/pkg_install/files/lib/version.h
--- a/pkgtools/pkg_install/files/lib/version.h Wed Sep 17 15:04:21 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/version.h Wed Sep 17 15:21:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.104 2008/09/16 13:32:58 joerg Exp $ */
+/* $NetBSD: version.h,v 1.105 2008/09/17 15:21:30 joerg Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -27,6 +27,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20080915"
+#define PKGTOOLS_VERSION "20080916"
#endif /* _INST_LIB_VERSION_H_ */
Home |
Main Index |
Thread Index |
Old Index