Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 2013 10:25:23 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r328262 - in head/ports-mgmt/pkg-devel: . files
Message-ID:  <201309251025.r8PAPN3g087466@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Wed Sep 25 10:25:23 2013
New Revision: 328262
URL: http://svnweb.freebsd.org/changeset/ports/328262

Log:
  - Sync with ports-mgmt/pkg
  
  Changes:
    - Fix @exec/post-install script execution with pkg register -i
    - Fix MTREE not properly being extracted with pkg register -i
    - Fix staging of meta ports that have no files, such as
      mail/squirrelmail-plugins
  
  With hat:	portmgr

Added:
  head/ports-mgmt/pkg-devel/files/patch-libpkg__pkg.c   (contents, props changed)
  head/ports-mgmt/pkg-devel/files/patch-libpkg__pkg_add.c   (contents, props changed)
  head/ports-mgmt/pkg-devel/files/patch-libpkg__pkg_create.c   (contents, props changed)
  head/ports-mgmt/pkg-devel/files/patch-libpkg__private__pkg.h   (contents, props changed)
Modified:
  head/ports-mgmt/pkg-devel/Makefile
Directory Properties:
  head/ports-mgmt/pkg-devel/files/patch-libpkg__pkg.h.in   (props changed)
  head/ports-mgmt/pkg-devel/files/patch-libpkg__pkg_elf.c   (props changed)
  head/ports-mgmt/pkg-devel/files/patch-libpkg__pkgdb.c   (props changed)
  head/ports-mgmt/pkg-devel/files/patch-libpkg__private__elf_tables.h   (props changed)
  head/ports-mgmt/pkg-devel/files/patch-pkg__register.c   (props changed)

Modified: head/ports-mgmt/pkg-devel/Makefile
==============================================================================
--- head/ports-mgmt/pkg-devel/Makefile	Wed Sep 25 10:24:50 2013	(r328261)
+++ head/ports-mgmt/pkg-devel/Makefile	Wed Sep 25 10:25:23 2013	(r328262)
@@ -2,7 +2,7 @@
 
 PORTNAME=	pkg
 DISTVERSION=	1.1.4
-PORTREVISION=	1
+PORTREVISION=	5
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	http://files.etoilebsd.net/pkg/ \
 		http://mirror.shatow.net/freebsd/${PORTNAME}/ \

Added: head/ports-mgmt/pkg-devel/files/patch-libpkg__pkg.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/pkg-devel/files/patch-libpkg__pkg.c	Wed Sep 25 10:25:23 2013	(r328262)
@@ -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-devel/files/patch-libpkg__pkg_add.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/pkg-devel/files/patch-libpkg__pkg_add.c	Wed Sep 25 10:25:23 2013	(r328262)
@@ -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-devel/files/patch-libpkg__pkg_create.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/pkg-devel/files/patch-libpkg__pkg_create.c	Wed Sep 25 10:25:23 2013	(r328262)
@@ -0,0 +1,11 @@
+--- ./libpkg/pkg_create.c.orig	2013-09-24 16:27:05.716245523 -0500
++++ ./libpkg/pkg_create.c	2013-09-24 16:27:17.642245427 -0500
+@@ -323,7 +323,7 @@
+ 		goto cleanup;
+ 	}
+ 
+-	if (pkg_files(pkg, &file) != EPKG_OK &&
++	if (0 && pkg_files(pkg, &file) != EPKG_OK &&
+ 	    pkg_dirs(pkg, &dir) != EPKG_OK) {
+ 		/* Now traverse the file directories, adding to the archive */
+ 		packing_append_tree(pkg_archive, md_dir, NULL);

Added: head/ports-mgmt/pkg-devel/files/patch-libpkg__private__pkg.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/pkg-devel/files/patch-libpkg__private__pkg.h	Wed Sep 25 10:25:23 2013	(r328262)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309251025.r8PAPN3g087466>