Bug 251142 - Mk/Scripts/qa.sh: Does not always warn about missing USES (in place of {LIB,BUILD,RUN}_DEPENDS)
Summary: Mk/Scripts/qa.sh: Does not always warn about missing USES (in place of {LIB,B...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-14 20:34 UTC by Loïc Bartoletti
Modified: 2020-11-18 08:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Bartoletti freebsd_committer 2020-11-14 20:34:05 UTC
I'm facing an issue, where I notice that stage-qa does not alway warn about misuse of _DEPENDS instead of USES=xxx.

For example graphics/librasterlite2, I have a warning for Gnome/libxml2 (Warning: you need USE_GNOME+=libxml2) but not for sqlite3.

Another example sysutils/pacman requires libarchive.so (LIB_DEPENDS=    libarchive.so.13:archivers/libarchive) but stage-qa doesn't warn about USES=libarchive

I tested all ports found with libsqlite3.so instead of USES=sqlite and I have no notice in the poudriere of the warning "you need USES+=sqlite".

Am I missing something?
Comment 1 Loïc Bartoletti freebsd_committer 2020-11-15 17:07:00 UTC
Other example with SDL:

games/dose-response use "LIB_DEPENDS+=   libSDL2.so:devel/sdl20" instead of USES=sdl2

===========================================================================
====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
=>> Checking for staging violations... done
=======================<phase: package        >============================
Comment 2 Mathieu Arnold freebsd_committer 2020-11-16 10:12:54 UTC
(In reply to Loïc Bartoletti from comment #0)
> Am I missing something?

A patch ?

If you look at proxydeps_suggest_uses() in qa.sh there are already sdl related lines, maybe they need expanding.
Comment 3 Loïc Bartoletti freebsd_committer 2020-11-16 18:09:16 UTC
(In reply to Mathieu Arnold from comment #2)
> A patch ?

Patches are coming, yes.

> If you look at proxydeps_suggest_uses() in qa.sh there are already sdl related lines,

That's exactly why I opened this ticket. I don't understand why there is no warning on the ports listed above (sdl for the example above, but it's the same for those using databases/sqlite3 instead of USES=sqlite3)

> maybe they need expanding.

What do you mean by expanding?

Thanks.
Comment 4 commit-hook freebsd_committer 2020-11-16 18:18:43 UTC
A commit references this bug:

Author: lbartoletti
Date: Mon Nov 16 18:18:02 UTC 2020
New revision: 555504
URL: https://svnweb.freebsd.org/changeset/ports/555504

Log:
  game/dose-response: convert to USE_SDL=sdl2

  PR:		251142
  Approved by:	portmgr (blanket convert to USE)

Changes:
  head/games/dose-response/Makefile
Comment 5 commit-hook freebsd_committer 2020-11-16 18:43:49 UTC
A commit references this bug:

Author: lbartoletti
Date: Mon Nov 16 18:43:44 UTC 2020
New revision: 555507
URL: https://svnweb.freebsd.org/changeset/ports/555507

Log:
  graphics/* convert to USES=sqlite

  PR:		251142
  Approved by:	portmgr (blanket, convert to USES)

Changes:
  head/graphics/hugin/Makefile
  head/graphics/librasterlite/Makefile
  head/graphics/librasterlite2/Makefile
  head/graphics/libreatlas/Makefile
  head/graphics/mapcache/Makefile
  head/graphics/proj/Makefile
Comment 6 Mathieu Arnold freebsd_committer 2020-11-17 10:30:37 UTC
Mmmm, sorry, mismatched problems.

The proxydep thing is there to tell you if you forgot a dependency on some lib.

For example, your port needs libfoo that came as a dependency of the bar port your port depends on, it builds fine because the dependency is proxied through bar, the framework tells you "you need to add a dependency on libfoo", and if there is a special case, which is what the suggest thing is for, instead of telling you "add LIB_DEPENDS+= libfoo.so:devel/foo" it tells you "add USES+=foo"

I do not think there is a check that tells you that if you have a dependency on devel/foo it needs to be done through USES=foo and not on a LIB_DEPENDS directly.
Comment 7 Loïc Bartoletti freebsd_committer 2020-11-18 05:36:03 UTC
(In reply to Mathieu Arnold from comment #6)
I thought its role was indeed to warn if there was a dependency not specified in the makefile AND also to check if the dependency on devel/foo it needs to be done through USES=foo and not on a LIB_DEPENDS directly.

Thanks for your clarification!

I close the ticket
I will continue to fix the ports I find not using USES=foo.
Comment 8 Mathieu Arnold freebsd_committer 2020-11-18 08:08:05 UTC
Well, USES=foo simply add stuff to LIB_DEPENDS, so from the QA script, it is the same.

There could be a new QA checked added to warn when you have libfoo in LIB_DEPENDS but not USES=foo, and the various USE_FOO=bar, but it does not exist yet.