pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools/pkg_install/files
Module Name: pkgsrc
Committed By: martin
Date: Sat Dec 7 13:56:46 UTC 2024
Modified Files:
pkgsrc/pkgtools/pkg_install/files/add: perform.c
pkgsrc/pkgtools/pkg_install/files/create: build.c
Log Message:
revert previous as requested by jperkin
To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 pkgsrc/pkgtools/pkg_install/files/add/perform.c
cvs rdiff -u -r1.18 -r1.19 pkgsrc/pkgtools/pkg_install/files/create/build.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/pkg_install/files/add/perform.c
diff -u pkgsrc/pkgtools/pkg_install/files/add/perform.c:1.127 pkgsrc/pkgtools/pkg_install/files/add/perform.c:1.128
--- pkgsrc/pkgtools/pkg_install/files/add/perform.c:1.127 Sat Dec 7 13:20:14 2024
+++ pkgsrc/pkgtools/pkg_install/files/add/perform.c Sat Dec 7 13:56:46 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.127 2024/12/07 13:20:14 martin Exp $ */
+/* $NetBSD: perform.c,v 1.128 2024/12/07 13:56:46 martin 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.127 2024/12/07 13:20:14 martin Exp $");
+__RCSID("$NetBSD: perform.c,v 1.128 2024/12/07 13:56:46 martin Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <grant%NetBSD.org@localhost>
@@ -693,7 +693,6 @@ extract_files(struct pkg_task *pkg)
plist_t *p;
const char *last_file;
char *fullpath;
- int workdir;
if (Fake)
return 0;
@@ -708,12 +707,6 @@ extract_files(struct pkg_task *pkg)
return -1;
}
- workdir = open(".", O_RDONLY|O_CLOEXEC|O_DIRECTORY);
- if (workdir == -1) {
- warn("Can't open current working directory");
- return -1;
- }
-
if (chdir(pkg->install_prefix) == -1) {
warn("Can't change into prefix: %s", pkg->install_prefix);
return -1;
@@ -840,9 +833,6 @@ out:
pkgdb_close();
archive_write_free(writer);
- fchdir(workdir);
- close(workdir);
-
return r;
}
Index: pkgsrc/pkgtools/pkg_install/files/create/build.c
diff -u pkgsrc/pkgtools/pkg_install/files/create/build.c:1.18 pkgsrc/pkgtools/pkg_install/files/create/build.c:1.19
--- pkgsrc/pkgtools/pkg_install/files/create/build.c:1.18 Sat Dec 7 13:18:43 2024
+++ pkgsrc/pkgtools/pkg_install/files/create/build.c Sat Dec 7 13:56:46 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: build.c,v 1.18 2024/12/07 13:18:43 martin Exp $ */
+/* $NetBSD: build.c,v 1.19 2024/12/07 13:56:46 martin Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: build.c,v 1.18 2024/12/07 13:18:43 martin Exp $");
+__RCSID("$NetBSD: build.c,v 1.19 2024/12/07 13:56:46 martin Exp $");
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -229,6 +229,7 @@ make_dist(const char *pkg, const char *s
struct archive *archive;
struct archive_entry *entry, *sparse_entry;
struct archive_entry_linkresolver *resolver;
+ char *initial_cwd;
archive = archive_write_new();
archive_write_set_format_pax_restricted(archive);
@@ -290,6 +291,8 @@ make_dist(const char *pkg, const char *s
if (Preserve)
write_meta_file(preserve_file, archive);
+ initial_cwd = getcwd(NULL, 0);
+
for (p = plist->head; p; p = p->next) {
if (p->type == PLIST_FILE) {
write_normal_file(p->name, archive, resolver, owner, group);
@@ -322,6 +325,8 @@ make_dist(const char *pkg, const char *s
if (archive_write_free(archive))
errx(2, "cannot finish archive: %s", archive_error_string(archive));
+
+ free(initial_cwd);
}
static struct memory_file *
Home |
Main Index |
Thread Index |
Old Index