Bug 184008 - devel/gdb with the python option produces a package that uses bogus stagedir path
Summary: devel/gdb with the python option produces a package that uses bogus stagedir ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Danilo Egea Gondolfo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-15 21:00 UTC by Jean-Paul Calderone
Modified: 2013-11-18 03:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Paul Calderone 2013-11-15 21:00:02 UTC
Building gdb 7.6.1 from ports with this option:

    .if ${.CURDIR:N*/ports/devel/gdb} == ""
    OPTIONS_SET+=           PYTHON
    .endif

appears to properly enable gdb's Python integration but does so with a bogus default path for some of the support files.  When running the resulting gdb, this output is included in the startup blob:

Python Exception <type 'exceptions.ImportError'> No module named gdb: 

warning: 
Could not load the Python gdb module from `/wrkdirs/usr/ports/devel/gdb/work/stage/usr/local/share/gdb761/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.

The correct path which should be used instead is /usr/local/share/gdb761/python.

Launching gdb with --data-directory=/usr/local/share/gdb761/ suppresses this error and appears to make everything work fine.

How-To-Repeat: 1) Build gdb 7.6.1 from ports with PYTHON enabled
2) Install the resulting package
3) Run gdb from the resulting package
4) See a warning from gdb
Comment 1 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2013-11-15 22:23:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->danilo

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-11-18 03:35:38 UTC
Author: danilo
Date: Mon Nov 18 03:35:30 2013
New Revision: 334141
URL: http://svnweb.freebsd.org/changeset/ports/334141

Log:
  - Fix the search path of python files
  
  PR:		ports/184008
  Reported by:	Jean-Paul Calderone <jean-paul@hybridcluster.com>
  Reviewed by:	Luca Pizzamiglio <luca.pizzamiglio@gmail.com> (maintainer)

Modified:
  head/devel/gdb/Makefile

Modified: head/devel/gdb/Makefile
==============================================================================
--- head/devel/gdb/Makefile	Mon Nov 18 03:04:05 2013	(r334140)
+++ head/devel/gdb/Makefile	Mon Nov 18 03:35:30 2013	(r334141)
@@ -18,7 +18,7 @@ USES=		iconv gmake
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	CONFIGURED_M4=m4 CONFIGURED_BISON=byacc
 CONFIGURE_ARGS=	--program-suffix=${PORTVERSION:S/.//g} \
-		--with-gdb-datadir=${STAGEDIR}${PREFIX}/share/gdb${PORTVERSION:S/.//g} \
+		--with-gdb-datadir=${PREFIX}/share/gdb${PORTVERSION:S/.//g} \
 		${ICONV_CONFIGURE_ARG} \
 		--without-libunwind-ia64 \
 		--enable-targets=all
@@ -91,8 +91,8 @@ do-install:
 	${LN} -sf gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdb
 .endif
 .if ${PORT_OPTIONS:MPYTHON}
-	(cd ${WRKSRC}/gdb; ${GMAKE} install-python )
-	(cd ${WRKSRC}/gdb/data-directory; ${GMAKE} install-python )
+	(cd ${WRKSRC}/gdb; ${GMAKE} DESTDIR=${STAGEDIR} install-python )
+	(cd ${WRKSRC}/gdb/data-directory; ${GMAKE} DESTDIR=${STAGEDIR} install-python )
 .endif
 
 post-install:
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2013-11-18 03:36:33 UTC
State Changed
From-To: open->closed

Fixed! Thanks!