summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-11-03 09:35:14 +0000
committerjoerg <joerg@pkgsrc.org>2006-11-03 09:35:14 +0000
commit611e7f92def9765d5e71f549847595962f56363d (patch)
tree533daf721cbc0b8a94f88f87e727618fc9a24c20 /pkgtools
parentc9280515c9bb8b4be8188fe561b258c76bb8bc6a (diff)
downloadpkgsrc-611e7f92def9765d5e71f549847595962f56363d.tar.gz
Merge add/extract.c, rev 1.39:
If a plist contains @owner or @group entries and first rename failed, pushout was called with NULL argument. This has the semantic of using a working directory of "/", even though already read plist entries are relative to prefix. The calls to chown and chgrp therefore end up with the wrong arguments for the current directory. To compensate for this, don't pushout the first time. As plists are not supposed to have multiple @cwd entries anymore, this could most likely be simplified, but that is outside the scope of this commit. Merge lib/plist.c, rev 1.51: When processing symlinks in pkg_delete and the call to readlink failed, it often helps to know why, so use warn instead of warnx. Bump version to 20061103.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/files/add/extract.c7
-rw-r--r--pkgtools/pkg_install/files/lib/plist.c6
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
3 files changed, 9 insertions, 8 deletions
diff --git a/pkgtools/pkg_install/files/add/extract.c b/pkgtools/pkg_install/files/add/extract.c
index 1d154d9235c..79c7e960b21 100644
--- a/pkgtools/pkg_install/files/add/extract.c
+++ b/pkgtools/pkg_install/files/add/extract.c
@@ -1,4 +1,4 @@
-/* $NetBSD: extract.c,v 1.13 2005/11/22 15:44:59 ben Exp $ */
+/* $NetBSD: extract.c,v 1.14 2006/11/03 09:35:14 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "FreeBSD - Id: extract.c,v 1.17 1997/10/08 07:45:35 charnier Exp";
#else
-__RCSID("$NetBSD: extract.c,v 1.13 2005/11/22 15:44:59 ben Exp $");
+__RCSID("$NetBSD: extract.c,v 1.14 2006/11/03 09:35:14 joerg Exp $");
#endif
#endif
@@ -243,7 +243,8 @@ extract_plist(char *home, package_t *pkg)
} else {
/* rename failed, try copying with a big tar command */
if (last_chdir != Directory) {
- pushout(last_chdir);
+ if (last_chdir != NULL)
+ pushout(last_chdir);
last_chdir = Directory;
} else if (p->name[0] == '/') {
pushout(Directory);
diff --git a/pkgtools/pkg_install/files/lib/plist.c b/pkgtools/pkg_install/files/lib/plist.c
index 38c58fd39ec..7470fdb773b 100644
--- a/pkgtools/pkg_install/files/lib/plist.c
+++ b/pkgtools/pkg_install/files/lib/plist.c
@@ -1,4 +1,4 @@
-/* $NetBSD: plist.c,v 1.14 2005/11/05 13:20:09 wiz Exp $ */
+/* $NetBSD: plist.c,v 1.15 2006/11/03 09:35:14 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.14 2005/11/05 13:20:09 wiz Exp $");
+__RCSID("$NetBSD: plist.c,v 1.15 2006/11/03 09:35:14 joerg Exp $");
#endif
#endif
@@ -408,7 +408,7 @@ delete_package(Boolean ign_err, Boolean nukedirs, package_t *pkg, Boolean NoDele
sizeof(buf));
if ((cc = readlink(tmp, &buf[SymlinkHeaderLen],
sizeof(buf) - SymlinkHeaderLen - 1)) < 0) {
- warnx("can't readlink `%s'", tmp);
+ warn("can't readlink `%s'", tmp);
continue;
}
buf[SymlinkHeaderLen + cc] = 0x0;
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index 152b0e341c5..cbe6c61363d 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.61 2006/07/20 11:29:48 gson Exp $ */
+/* $NetBSD: version.h,v 1.62 2006/11/03 09:35:14 joerg 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 "20060720"
+#define PKGTOOLS_VERSION "20061103"
#endif /* _INST_LIB_VERSION_H_ */