pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bug in mk/plist/plist-info.awk



On Mon, 11 Feb 2019, at 17:28:02 +0100, Aleksej Lebedev wrote:
> Hi.
> 
> I found a bug in mk/plist/plist-info.awk, which I am hesitating to fix
> myself because I don't fully understand why the following reg-ex is
> written like it is.
> 
> 
> It's the line 103:
> 
>     /^([^\/]*\/)*(info\/[^\/]+(\.info)?|[^\/]+\.info)$/ {
> 
> Because of this ? after (\.info) some unrelated lines like this one:
> 
> lib/python3.6/site-
> packages/conans/test/unittests/model/info/__init__.py
> 
> 
> get (incorrectly) matched which results in them being skipped, while
> when PLIST is processed by lang/python/plist-python.awk later.
> 
> I am not 100% if this ? was added by mistake, but it results in files
> like
> 
> one mentioned above being matched.
> 
> Not sure I understand why the cases
> 
>     path/to/some/info/file.info
> 
> and
> 
>     path/to/some/file.info
> 
> are matched separately.
> 
> So to me, the whole reg-ex should be written as:
> 
>     /^([^\/]*\/)*[^\/]+\.info$/
> 
> But I might miss something.

There is a workaround you can apply in your package:

diff --git a/py-conan/Makefile b/py-conan/Makefile
index 6a48049017..9a005d6a7a 100644
--- a/py-conan/Makefile
+++ b/py-conan/Makefile
@@ -12,6 +12,7 @@ LICENSE=      mit
 
 USE_LANGUAGES= # none
 
+IGNORE_INFO_DIRS+=     ${PYSITELIB}/conans/test/unittests/model/info
 
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && for b in conan conan_build_info
conan_server; \

(Though I still argue that approach should be opt-in for packages that
need to explicitly deal with info files missing the expected extension,
not opt-out for packages that don't need it.)

Dave



Home | Main Index | Thread Index | Old Index