From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 6 13:40:13 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA8591065672 for ; Thu, 6 Sep 2012 13:40:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8254A8FC18 for ; Thu, 6 Sep 2012 13:40:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q86DeDPQ015986 for ; Thu, 6 Sep 2012 13:40:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q86DeDMa015973; Thu, 6 Sep 2012 13:40:13 GMT (envelope-from gnats) Resent-Date: Thu, 6 Sep 2012 13:40:13 GMT Resent-Message-Id: <201209061340.q86DeDMa015973@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "John W. O'Brien" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA20B10656D5 for ; Thu, 6 Sep 2012 13:32:30 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id C4B7F8FC15 for ; Thu, 6 Sep 2012 13:32:30 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q86DWU7T031198 for ; Thu, 6 Sep 2012 13:32:30 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q86DWUGi031163; Thu, 6 Sep 2012 13:32:30 GMT (envelope-from nobody) Message-Id: <201209061332.q86DWUGi031163@red.freebsd.org> Date: Thu, 6 Sep 2012 13:32:30 GMT From: "John W. O'Brien" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/171381: [patch] finance/gnucash fails to generate and install .pyc/.pyo files X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 13:40:13 -0000 >Number: 171381 >Category: ports >Synopsis: [patch] finance/gnucash fails to generate and install .pyc/.pyo files >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 06 13:40:13 UTC 2012 >Closed-Date: >Last-Modified: >Originator: John W. O'Brien >Release: 9.1-PRERELEASE >Organization: Saltant Solutions >Environment: FreeBSD XXXX.saltant.net 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #3 r239833: Wed Aug 29 10:08:24 EDT 2012 root@XXXX.saltant.net:/usr/obj/usr/src/sys/NIPPL amd64 >Description: When Python binding/support is enabled (PORT_OPTIONS+=PYTHON), the compiled Python bytecode (.pyc) and optimized bytecode (.pyo) files are not generated by the build target, nor installed by the install target. However, the packing list specifies them and therefore the package target expects them and fails as a result. [/usr/ports]# svn info | egrep "URL|Revision" URL: svn://svn0.us-east.freebsd.org/ports/head Revision: 303631 [/usr/ports/finance/gnucash]# make showconfig ===> The following configuration options are available for gnucash-2.4.11_2: AQBANKING=on: AqBanking support (HBCI/OpenHBCI) DATABASE=on: Enable SQL database backends LOCALE_TAX=off: Enable localized tax categories OFX=on: OFX support PYTHON=on: Python binding/support WEBKIT=off: Use webkit instead of gtkhtml for the HTML engine ===> Use 'make config' to modify these settings [/usr/ports/finance/gnucash]# make -V CC -V CXX -V CPP -V PYTHON_REL clang clang++ clang-cpp 273 [/usr/ports/finance/gnucash]# grep ".py" pkg-plist %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/__init__.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/__init__.pyc %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/__init__.pyo %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/function_class.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/function_class.pyc %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/function_class.pyo %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/gnucash_business.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/gnucash_business.pyc %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/gnucash_business.pyo %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/gnucash_core.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/gnucash_core.pyc %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/gnucash_core.pyo %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/gnucash_core_c.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/gnucash_core_c.pyc %%PYTHON%%%%PYTHON_SITELIBDIR%%/gnucash/gnucash_core_c.pyo >How-To-Repeat: (Output omitted) Package creation fails: [/usr/ports/finance/gnucash]# make package Package deinstallation generates warnings due to missing files: [/usr/ports/finance/gnucash]# make install [/usr/ports/finance/gnucash]# make deinstall >Fix: The attached patch provides a quick and dirty solution by generating the compiled bytecode files in situ using a gnucash-provided in the post-install target. If this script were to fail, the installation would not complete cleanly (e.g. pkg_delete would be useless). I expect that a better fix would be to patch, in an upstream-able fashion, ${WRKDIR}/gnucash-2.4.11/src/optional/python-bindings/Makefile.am to generate and install the bytecode files. This exceeds my abilities with autotools however and must be deferred to a more knowledgeable developer. I'd be happy to help if given suitable direction. Patch attached with submission follows: Index: Makefile =================================================================== --- Makefile (revision 303631) +++ Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= gnucash PORTVERSION= 2.4.11 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= finance gnome MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20%28stable%29/${PORTVERSION} @@ -115,6 +115,10 @@ .endif post-install: +. if${PORT_OPTIONS:MPYTHON} + ${WRKDIR}/${PORTNAME}-${PORTVERSION}/py-compile \ + ${PYTHON_SITELIBDIR}/${PORTNAME}/*.py +. endif @${CAT} ${PKGMESSAGE} .include >Release-Note: >Audit-Trail: >Unformatted: