pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/46570: infelicities in pkglint
The following reply was made to PR pkg/46570; it has been noted by GNATS.
From: Thomas Klausner <wiz%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: pkg/46570: infelicities in pkglint
Date: Tue, 10 Jul 2012 12:28:13 +0200
On Mon, Jul 09, 2012 at 08:35:02PM +0000, David Holland wrote:
> That's a start. How about having it output words? Then it wouldn't be
> necessary to look them up or explain them.
Done (not sure if I already mailed about that).
> They can and do reside in files/, and when invoked with -Call as is
> usually recommended, pkglint takes it upon itself to inspect the
> contents of files/ and becomes confused. For example:
>
> % cd archivers/libarchive/
> % pkglint -Call
> FATAL: files/Makefile.am:175: Unknown line format: ./files/Makefile.am:175:
> if INC_WINDOWS_FILES
> Exit 1
>
> They can and do reside in files/, and when invoked with -Call as is
> usually recommended, pkglint takes it upon itself to inspect the
> contents of files/ and becomes confused. For example:
>
> valkyrie% cd sysutils/p5-UPS-Nut/
> valkyrie% pkglint -Call
> WARN: ../../sysutils/ups-nut/Makefile.common:7: Please add a line "# used
> by sysutils/p5-UPS-Nut/Makefile" here.
> FATAL: files/Makefile.PL:4: Unknown line format: ./files/Makefile.PL:4:
> WriteMakefile(
> Exit 1
>
> You didn't look in files/. Makefiles with this construction can and do
> reside in files/, and when invoked with -Call as is usually
> recommended, pkglint takes it upon itself to inspect the contents of
> files/ and becomes confused. For example:
>
> valkyrie% cd devel/bmake/
> valkyrie% pkglint -Call
> FATAL: files/Makefile.in:101: Unknown line format: ./files/Makefile.in:101:
> .-include <bsd.prog.mk>
> Exit 1
Makefile* and *mk in files/ and patches/ aren't checked as Makefiles any
longer.
> Not offhand, because I have been changing them when I find them.
> However, you don't need an existing example; just take your favorite
> test package and add this:
>
> post-install:
> for x in foo bar baz; do \
> ${INSTALL_PROGRAM} "$$x" ${DESTDIR}${PREFIX}/share; \
> done
>
> then run pkglint -Wall. You will get:
>
> WARN: Makefile:37--39: Please switch to "set -e" mode before using a
> semicolon to separate commands.
>
> On reflection the warning may be coming from the ; before "done"
> rather than the one before "do", but the shell won't accept && there
> so it's still wrong.
Actually, I like the warning.
I prefer this behavior:
set -e; for i in 1 2 3; do echo $i; false; done
1
*** Error code 1
to:
for i in 1 2 3; do echo $i; false; done
1
2
3
*** Error code 1
> And, btw, another one: pkglint bails out if it encounters a makefile
> line of the form "foo : bar", with a space before the colon. Arguably
> it's correct to object to this, but it shouldn't crash.
Fixed.
I think I've addressed all your points. Anything else?
Thomas
Home |
Main Index |
Thread Index |
Old Index