Date: Wed, 14 Mar 2012 10:17:37 +0100 (CET) From: Romain Tartiere <romain@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/166082: [patch] devel/gdb does not install gdb link from packages. Message-ID: <20120314091738.3DBBC3D402@marvin.blogreen.org> Resent-Message-ID: <201203140920.q2E9K2oW051374@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 166082 >Category: ports >Synopsis: [patch] devel/gdb does not install gdb link from packages. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Mar 14 09:20:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Romain Tartiere >Release: FreeBSD 9.0-STABLE amd64 >Organization: >Environment: System: FreeBSD marvin.blogreen.org 9.0-STABLE FreeBSD 9.0-STABLE #25 r230911: Thu Feb 2 14:45:22 CET 2012 root@marvin.blogreen.org:/usr/obj/usr/src/sys/MARVIN amd64 >Description: Installing a package of devel/gdb with GDB_LINK option set does not install the ${LOCALBASE}/bin/gdb link. >How-To-Repeat: # cd /usr/ports/devel/gdb && make package # file /usr/local/bin/gdb # Works # pkg_delete gdb-\* # pkg_add gdb* # file /usr/local/bin/gdb # Fails >Fix: Either create the link from the pkg-plist in the same fashion it is removed on uninstall and remove the related lines from the Makefile: --- p1 begins here --- diff -Nur /var/cache/portshaker/ports/devel/gdb/Makefile ./Makefile --- /var/cache/portshaker/ports/devel/gdb/Makefile 2012-03-09 18:03:28.000000000 +0100 +++ ./Makefile 2012-03-14 10:08:51.845892784 +0100 @@ -105,8 +105,5 @@ (cd ${WRKSRC}/gdb; ${GMAKE} install-python ) (cd ${WRKSRC}/gdb/data-directory; ${GMAKE} install-python ) .endif -.if defined(WITH_GDB_LINK) - ${LN} -s ${PREFIX}/bin/gdb${VER} ${PREFIX}/bin/gdb -.endif .include <bsd.port.post.mk> diff -Nur /var/cache/portshaker/ports/devel/gdb/pkg-plist ./pkg-plist --- /var/cache/portshaker/ports/devel/gdb/pkg-plist 2012-03-09 18:03:28.000000000 +0100 +++ ./pkg-plist 2012-03-14 10:09:02.533985850 +0100 @@ -11,4 +11,5 @@ %%PYTHON%%@dirrm share/gdb%%VER%%/python/gdb %%PYTHON%%@dirrm share/gdb%%VER%%/python %%PYTHON%%@dirrm share/gdb%%VER%% +@exec if $( %%GDB_LINK%% ) ; then ln -fs %%PREFIX%%/bin/gdb%%VER%% %%PREFIX%%/bin/gdb; fi @unexec if $( %%GDB_LINK%% ) ; then rm -f %%PREFIX%%/bin/gdb; fi --- p1 ends here --- OR package the link in pkg-plist: --- p2 begins here --- diff -Nur /var/cache/portshaker/ports/devel/gdb/Makefile ./Makefile --- /var/cache/portshaker/ports/devel/gdb/Makefile 2012-03-09 18:03:28.000000000 +0100 +++ ./Makefile 2012-03-14 10:12:45.204626165 +0100 @@ -55,9 +55,9 @@ .include <bsd.port.options.mk> .if defined(WITH_GDB_LINK) -PLIST_SUB+= GDB_LINK=true +PLIST_SUB+= GDB_LINK="" .else -PLIST_SUB+= GDB_LINK=false +PLIST_SUB+= GDB_LINK="@comment " .endif .if defined(WITH_PYTHON) diff -Nur /var/cache/portshaker/ports/devel/gdb/pkg-plist ./pkg-plist --- /var/cache/portshaker/ports/devel/gdb/pkg-plist 2012-03-09 18:03:28.000000000 +0100 +++ ./pkg-plist 2012-03-14 10:13:11.288629566 +0100 @@ -1,3 +1,4 @@ +%%GDB_LINK%%bin/gdb bin/gdb%%VER%% bin/gdbtui%%VER%% %%PYTHON%%share/gdb%%VER%%/python/gdb/__init__.py @@ -11,4 +12,3 @@ %%PYTHON%%@dirrm share/gdb%%VER%%/python/gdb %%PYTHON%%@dirrm share/gdb%%VER%%/python %%PYTHON%%@dirrm share/gdb%%VER%% -@unexec if $( %%GDB_LINK%% ) ; then rm -f %%PREFIX%%/bin/gdb; fi --- p2 ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120314091738.3DBBC3D402>