aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/pkg
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-12-25 15:15:38 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-12-25 15:15:38 +0000
commit0693ccefbeaf3f01ce7760ca618ab660dd3c6906 (patch)
tree80cf5a7815217604f17dfe15da17b46fd2192bac /ports-mgmt/pkg
parent234f3ad65829382f91f22039a580054a2ca579bc (diff)
downloadports-0693ccefbeaf3f01ce7760ca618ab660dd3c6906.tar.gz
ports-0693ccefbeaf3f01ce7760ca618ab660dd3c6906.zip
Notes
Diffstat (limited to 'ports-mgmt/pkg')
-rw-r--r--ports-mgmt/pkg/Makefile1
-rw-r--r--ports-mgmt/pkg/files/patch-libpkg_pkg__add.c22
2 files changed, 23 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index b05778f0f0fe..4a630c98f1e6 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -2,6 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.9.4
+PORTREVISION= 1
_PKG_VERSION= ${DISTVERSION}
CATEGORIES= ports-mgmt
MASTER_SITES= \
diff --git a/ports-mgmt/pkg/files/patch-libpkg_pkg__add.c b/ports-mgmt/pkg/files/patch-libpkg_pkg__add.c
new file mode 100644
index 000000000000..e12299348409
--- /dev/null
+++ b/ports-mgmt/pkg/files/patch-libpkg_pkg__add.c
@@ -0,0 +1,22 @@
+--- libpkg/pkg_add.c.orig 2016-12-25 15:12:01 UTC
++++ libpkg/pkg_add.c
+@@ -1344,8 +1344,10 @@ pkg_add_fromdir(struct pkg *pkg, const c
+ }
+ kh_find(hls, hardlinks, st.st_ino, path);
+ if (path != NULL) {
+- if (create_hardlink(pkg, f, path) == EPKG_FATAL)
++ if (create_hardlink(pkg, f, path) == EPKG_FATAL) {
++ close(fd);
+ return (EPKG_FATAL);
++ }
+ } else {
+ if (create_regfile(pkg, f, NULL, NULL, fd, NULL) == EPKG_FATAL) {
+ close(fd);
+@@ -1353,6 +1355,7 @@ pkg_add_fromdir(struct pkg *pkg, const c
+ }
+ kh_safe_add(hls, hardlinks, f->path, st.st_ino);
+ }
++ close(fd);
+ } else {
+ pkg_emit_error("Invalid file type");
+ return (EPKG_FATAL);