pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] lintpkgsrc cannot locate certain include files
On Sat, Jan 10, 2015 at 12:01:31AM -0600, J. Lewis Muir wrote:
> When I run "lintpkgsrc -i" in the root of my pkgsrc-current tree, I get
> errors like this:
>
> === console ===
> $ cd /pkgsrc-current
> $ lintpkgsrc -i
> Scan Makefiles: ..........._______________________________
> /pkgsrc-current/editors/emacs/Makefile: Cannot locate ../../editors/${MY_EMACS_TYPE:S/nox//}/version.mk in . /pkgsrc-current/editors/emacs
>
> /pkgsrc-current/editors/emacs-nox11/Makefile: Cannot locate ../../editors/${MY_EMACS_TYPE:S/nox//}-nox11/version.mk in . /pkgsrc-current/editors/emacs /pkgsrc-current/editors/emacs-nox11
> 12470 packages
> Version mismatch: 'py-cElementTree' 2.7.9 vs 3.4.2
> Version mismatch: 'py-expat' 2.7.9 vs 3.4.2
> ===============
>
> I reported this in September 2013:
>
> http://mail-index.netbsd.org/pkgsrc-users/2013/09/09/msg018608.html
>
> What I believe is happening is that lintpkgsrc's Makefile parsing can't
> handle includes that need recursive expansion like on line 113 of
> editors/emacs-nox11/Makefile.common:
>
> .include "${EMACS_PKGDIR}/version.mk"
>
> lintpkgsrc's Makefile parser does replace ${EMACS_PKGDIR} with the
> variable's value, but its value includes another variable that needs
> expansion. That second expansion doesn't happen, so it ends up looking
> for the file "../../editors/${MY_EMACS_TYPE:S/nox//}/version.mk" which
> obviously doesn't exist.
>
> The lintpkgsrc source code comments make it clear that the Makefile
> parsing is not perfect, and it already punts on includes that it
> couldn't fully expand. The below patch adds another condition for
> detecting an include that did not fully expand: it looks for "${" in the
> include path. With this patch, the lintpkgsrc output is fixed:
I've tried lintpkgsrc from pkgsrc of a couple days ago and lintpkgsrc
with your patch applied, and I didn't see a difference.
# lintpkgsrc -i > ~/lps.i.before 2> ~/lps.i.before.err
# ./pkgtools/lintpkgsrc/work/lintpkgsrc.pl -i > lps.i.after 2> ~/lps.i.after.err
# diff ~/lps.i.before /usr/pkgsrc/lps.i.after
#
Do I need particular packages installed to see this, or what does it depend on?
Thomas
Home |
Main Index |
Thread Index |
Old Index