Page MenuHomeFreeBSD

New USES=autoplist: Generates plist automatically for large projects
AbandonedPublic

Authored by yuri on Nov 21 2017, 8:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 26 2024, 3:07 AM
Unknown Object (File)
Sep 18 2024, 6:21 PM
Unknown Object (File)
Sep 8 2024, 6:29 PM
Unknown Object (File)
Sep 7 2024, 6:06 PM
Unknown Object (File)
Sep 7 2024, 4:50 PM
Unknown Object (File)
Sep 7 2024, 4:40 PM
Unknown Object (File)
Aug 31 2024, 4:36 PM
Unknown Object (File)
Aug 27 2024, 2:29 PM
Subscribers
None

Details

Reviewers
tcberner
adamw
mat
Group Reviewers
O5: Ports Framework(Owns No Changed Paths)
portmgr
Summary

While updating math/vtk, I found that its plist has thousands of files, a lot of optional and multi-optional files.
It is beneficial to just generate the plist autiomatically in this case, rather than manually updating and debugging it for hours (math/vtk takes a long time to build).

Therefore, suggesting USES=autoplist.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 12960
Build 13218: arc lint + arc unit

Event Timeline

This comment was removed by yuri.
This comment was removed by yuri.

I am not against the idea of this. There definitely are ports that have massive plists that change often, and many of those ports repeat a similar block to generate their own.

Autoplist ability hasn't been baked in yet because we absolutely want static plists whenever possible. Static plists are an important maintainer check and allow end-users to quickly figure out which port installs a particular file. There would need to be a policy of when autoplist is and isn't appropriate.

Mk/Scripts/check-stagedir.sh
18

You're introducing a new variable here, with a meaning that differs from the $BATCH that is used elsewhere.

Consider naming it what it is: ${USES_AUTOPLIST:=no} or something.

Mk/Uses/autoplist.mk
17

The problem here is that now static and dynamic plists are mutually exclusive. Is it possible to mix the two, i.e. have autoplist fill in all the files that weren't named in the pkg-plist?

Renamed the variable, made it internal.

yuri marked 2 inline comments as done.Nov 23 2017, 4:32 AM
yuri added inline comments.
Mk/Uses/autoplist.mk
17

It is impossible to mix the two. Merging would be an additional functionality with higher complexity and questionable usefulness IMO.

yuri marked 2 inline comments as done.Nov 23 2017, 4:32 AM
Mk/Scripts/check-stagedir.sh
18

I renamed the variable, made it explicitly internal. Naming it USES_x would have made it look like it introduces some USES clause, when it is not.

mat requested changes to this revision.Nov 23 2017, 5:07 PM

I will ALWAYS be against a generic autoplist.

It means nobody will ever check what files are packaged, and it is very, very, very bad.

If you need to do auto-plist in a port, because, for instance, the plist is huge, is is very easy, you add:

post-install:
        @cd ${STAGEDIR} && find -f * -type f >> ${TMPPLIST} && find -f * -type d -empty | sed -e 's/^/@dir /' >> ${TMPPLIST}

But a generic way of saying "I don't care whatever is in my package" is wrong.

Mk/Uses/autoplist.mk
16

Using makeplist is a very bad idea, it is intended for human consumption, not machine consumption.

This revision now requires changes to proceed.Nov 23 2017, 5:07 PM
In D13181#275228, @mat wrote:

I will ALWAYS be against a generic autoplist.

It means nobody will ever check what files are packaged, and it is very, very, very bad.

If you need to do auto-plist in a port, because, for instance, the plist is huge, is is very easy, you add:

post-install:
        @cd ${STAGEDIR} && find -f * -type f >> ${TMPPLIST} && find -f * -type d -empty | sed -e 's/^/@dir /' >> ${TMPPLIST}

But a generic way of saying "I don't care whatever is in my package" is wrong.

Thanks Mat.