Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 2014 13:30:39 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350008 - in head/ports-mgmt/pkg: . files
Message-ID:  <201404031330.s33DUd1H094385@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Thu Apr  3 13:30:39 2014
New Revision: 350008
URL: http://svnweb.freebsd.org/changeset/ports/350008
QAT: https://qat.redports.org/buildarchive/r350008/

Log:
  Add the ability to specifiy the file where the ABI string will be determined from

Added:
  head/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c   (contents, props changed)
Modified:
  head/ports-mgmt/pkg/Makefile

Modified: head/ports-mgmt/pkg/Makefile
==============================================================================
--- head/ports-mgmt/pkg/Makefile	Thu Apr  3 13:08:22 2014	(r350007)
+++ head/ports-mgmt/pkg/Makefile	Thu Apr  3 13:30:39 2014	(r350008)
@@ -2,7 +2,7 @@
 
 PORTNAME=	pkg
 DISTVERSION=	1.2.7
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	\
 		http://files.etoilebsd.net/${PORTNAME}/ \

Added: head/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c	Thu Apr  3 13:30:39 2014	(r350008)
@@ -0,0 +1,25 @@
+diff --git a/libpkg/pkg_elf.c b/libpkg/pkg_elf.c
+index 7c75606..165b65d 100644
+--- libpkg/pkg_elf.c
++++ libpkg/pkg_elf.c
+@@ -636,6 +636,11 @@
+ 	int ret = EPKG_OK;
+ 	int i;
+ 	const char *arch, *abi, *endian_corres_str, *wordsize_corres_str, *fpu;
++	const char *path;
++
++	path = getenv("ABI_FILE");
++	if (path == NULL)
++		path = _PATH_BSHELL;
+ 
+ 	if (elf_version(EV_CURRENT) == EV_NONE) {
+ 		pkg_emit_error("ELF library initialization failed: %s",
+@@ -643,7 +648,7 @@
+ 		return (EPKG_FATAL);
+ 	}
+ 
+-	if ((fd = open(_PATH_BSHELL, O_RDONLY)) < 0) {
++	if ((fd = open(path, O_RDONLY)) < 0) {
+ 		pkg_emit_errno("open", _PATH_BSHELL);
+ 		snprintf(dest, sz, "%s", "unknown");
+ 		return (EPKG_FATAL);



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