svn commit: r328121 - in head/ports-mgmt/pkg: . files
Baptiste Daroussin
bapt at FreeBSD.org
Tue Sep 24 12:26:44 UTC 2013
Author: bapt
Date: Tue Sep 24 12:26:43 2013
New Revision: 328121
URL: http://svnweb.freebsd.org/changeset/ports/328121
Log:
Fix @exec/post-install script execution with pkg register -i [1]
Fix MTREE not properly being extracted with pkg register -i [2]
Reported by: garga [1]
bdrewery [2]
Added:
head/ports-mgmt/pkg/files/patch-libpkg__pkg.c (contents, props changed)
head/ports-mgmt/pkg/files/patch-libpkg__pkg_add.c (contents, props changed)
head/ports-mgmt/pkg/files/patch-libpkg__private__pkg.h (contents, props changed)
Modified:
head/ports-mgmt/pkg/Makefile
Modified: head/ports-mgmt/pkg/Makefile
==============================================================================
--- head/ports-mgmt/pkg/Makefile Tue Sep 24 12:02:02 2013 (r328120)
+++ head/ports-mgmt/pkg/Makefile Tue Sep 24 12:26:43 2013 (r328121)
@@ -2,7 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.1.4
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= ports-mgmt
MASTER_SITES= http://files.etoilebsd.net/pkg/ \
http://mirror.shatow.net/freebsd/${PORTNAME}/ \
Added: head/ports-mgmt/pkg/files/patch-libpkg__pkg.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-libpkg__pkg.c Tue Sep 24 12:26:43 2013 (r328121)
@@ -0,0 +1,35 @@
+--- ./libpkg/pkg.c.orig 2013-09-24 14:53:00.000000000 +0200
++++ ./libpkg/pkg.c 2013-09-24 14:58:33.000000000 +0200
+@@ -1181,6 +1181,20 @@
+ struct pkg_dir *dir = NULL;
+ char spath[MAXPATHLEN + 1];
+ char dpath[MAXPATHLEN + 1];
++ bool disable_mtree;
++ const char *prefix;
++ char *mtree;
++
++ pkg_config_bool(PKG_CONFIG_DISABLE_MTREE, &disable_mtree);
++ if (!disable_mtree) {
++ pkg_get(pkg, PKG_PREFIX, &prefix, PKG_MTREE, &mtree);
++ do_extract_mtree(mtree, prefix);
++ }
++
++ /*
++ * Execute pre-install scripts
++ */
++ pkg_script_run(pkg, PKG_SCRIPT_PRE_INSTALL);
+
+ if (packing_init(&pack, dest, 0) != EPKG_OK) {
+ /* TODO */
+@@ -1200,6 +1214,11 @@
+ }
+
+
++ /*
++ * Execute post install scripts
++ */
++ pkg_script_run(pkg, PKG_SCRIPT_POST_INSTALL);
++
+ return (packing_finish(pack));
+ }
+
Added: head/ports-mgmt/pkg/files/patch-libpkg__pkg_add.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-libpkg__pkg_add.c Tue Sep 24 12:26:43 2013 (r328121)
@@ -0,0 +1,11 @@
+--- libpkg/pkg_add.c.orig 2013-07-06 12:48:19.000000000 +0200
++++ libpkg/pkg_add.c 2013-09-24 14:22:38.561062335 +0200
+@@ -100,7 +100,7 @@
+ return (retcode);
+ }
+
+-static int
++int
+ do_extract_mtree(char *mtree, const char *prefix)
+ {
+ struct archive *a = NULL;
Added: head/ports-mgmt/pkg/files/patch-libpkg__private__pkg.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-libpkg__private__pkg.h Tue Sep 24 12:26:43 2013 (r328121)
@@ -0,0 +1,8 @@
+--- ./libpkg/private/pkg.h.orig 2013-09-24 14:56:39.000000000 +0200
++++ ./libpkg/private/pkg.h 2013-09-24 14:57:23.000000000 +0200
+@@ -405,4 +405,5 @@
+ int pkg_emit_filelist(struct pkg *, FILE *);
+ int pkg_parse_manifest_archive(struct pkg *pkg, struct archive *a, struct pkg_manifest_key *keys);
+
++int do_extract_mtree(char *mtree, const char *prefix);
+ #endif
More information about the svn-ports-all
mailing list