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



> 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.

"cvs log" (or the git or hg equivalents) is your friend here. :)
Revision 1.5 of plist-info.awk states:

"Info pages don't always end in ".info" as noted in PR pkg/32699.  Fix
the
PLIST handling based on the suggestion in the PR by Johan Danielsson.
This restores the behavior from the old PLIST code."

(The PR referenced in the commit log is a typo, it should be
http://gnats.netbsd.org/32669.)

Someone decided paths that simply contain "/info/" should be assumed to
lead to GNU texinfo files. That's an ugly hack to work around a problem
with a specific package that just "kicked the can down the road" (as
Joerg pointed out in that PR at the time). The can has now landed at
your feet, I'm afraid. :\ It looks like undoing that code would mean
applying a different (probably local) fix to Emacs and possibly other
packages. (That is, unless Emacs has been fixed in the interim.)

Dave




Home | Main Index | Thread Index | Old Index