Subject: Re: Duplicate entries when showing dependance
To: None <tech-pkg@netbsd.org>
From: Arnaud Lacombe <lacombar@gmail.com>
List: tech-pkg
Date: 10/15/2007 23:39:57
------=_Part_33367_3921476.1192484397574
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On 10/15/07, Klaus Heinz <k.heinz@oktsieben.kh-22.de> wrote:
> Arnaud Lacombe wrote:
>
> > As it also happens with -current make(1) from march, I don't think it
> > has anything to do with recent change in it.
> >
> > Should I PR this ?
>
> A known problem in mk/*. Fixing it was deemed to be too dangerous. I
> do not know whether this assessment is still valid.
>
> ciao
> Klaus
>
ok, from my point of view, it seems pretty simple to fix. Here is
globally what happens to trigger the bug: in
mk/flavor/pkg/reduce-depends.awk, 'match_all' is initialized only if
'ge_depends' is not empty, which happens only if no regexp are
matched. So if a regexp is matched, 'ge_depends' will be empty, and
then th test on 'match_all', line 142, will be evaluated as true
('match_all' has not been set to 1 yet).
The following patch make things works better, at least for me. I tried
on a few packages and the output didn't change. BTW, net/nmapfe was
also affected by this problem.
Could this patch be considered as "deemed too dangerous" ?
- Arnaud
------=_Part_33367_3921476.1192484397574
Content-Type: application/octet-stream; name="duplicate_depends.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="duplicate_depends.diff";
filename="duplicate_depends.diff"
SW5kZXg6IHJlZHVjZS1kZXBlbmRzLmF3awo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvZGF0YS9uZXRi
c2QvY3Zzcm9vdC9wa2dzcmMvbWsvZmxhdm9yL3BrZy9yZWR1Y2UtZGVwZW5kcy5hd2ssdgpyZXRy
aWV2aW5nIHJldmlzaW9uIDEuNQpkaWZmIC11IC1yMS41IHJlZHVjZS1kZXBlbmRzLmF3awotLS0g
cmVkdWNlLWRlcGVuZHMuYXdrCTI3IFNlcCAyMDA3IDExOjExOjMyIC0wMDAwCTEuNQorKysgcmVk
dWNlLWRlcGVuZHMuYXdrCTE1IE9jdCAyMDA3IDIxOjM2OjA2IC0wMDAwCkBAIC0xMDgsNiArMTA4
LDcgQEAKIAlmb3IgKHAgPSAwOyBwIDwgUDsgcCsrKSB7CiAJCXBrZ3BhdGggPSBwa2dwYXRoc1tw
XQogCQlEID0gZGVwZW5kc1twa2dwYXRoLCAwXTsKKwkJbWF0Y2hfYWxsID0gMQogCQlmb3IgKGQg
PSAxOyBkIDw9IEQ7IGQrKykgewogCQkJZGVwID0gZGVwZW5kc1twa2dwYXRoLCBkXQogCQkJaWYg
KGRlcCB+IC9be10vIHx8IFwK
------=_Part_33367_3921476.1192484397574--