Bug 249255 - devel/tortoisehg: Python autoplist generates invalid items
Summary: devel/tortoisehg: Python autoplist generates invalid items
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Gleb Popov
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-09-11 14:43 UTC by Gleb Popov
Modified: 2020-09-20 11:41 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb Popov freebsd_committer 2020-09-11 14:43:13 UTC
To reproduce, comment the last ${REINPLACE_CMD} call in post-install target of the devel/tortoisehg port.

With the line commented, `make check-plist` results in 

Missing: share/pixmaps/tortoisehg/icons/16x16
Missing: share/pixmaps/tortoisehg/icons/22x22
...
Missing: share/pixmaps/tortoisehg/icons/scalable
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-09-20 09:29:25 UTC
autoplist uses setuptools --record output to produce the pkg-plist. This can be verified by looking at the various plist files in the $WRKDIR post-install

All else being equal, it's very likely these files aren't packaged correctly upstream, in the sense that they aren't in the --record output, due to being 'specially handled' in some way.

The usual method this takes place is custom build* or install* methods in setup.py, that override or replace the defaults in setuptools, which fail to add the files being processed to setuptools output files list that's used in --record output.

Workaround: pkg-plist entries can be used in combination (complementary to) autoplist, so put those "missing" pkg-plist entries there, if they arent already, until the root cause is identified and resolved.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2020-09-20 09:37:20 UTC
Here's one example where VERSION (file) wasn't in --record output due to upstreams use of a custom install_data method, subclassing the default (setuptools) "install_data" method:

https://github.com/buildbot/buildbot/pull/8/commits/86a599b102bbcf67f4daf0438ba1b5feef7a29a7

See also: https://github.com/search?q=%22outfiles%22+setup.py&type=code (probably  handy)
Comment 3 Gleb Popov freebsd_committer 2020-09-20 11:39:27 UTC
Ok, if this isn't our bug, let's close this.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2020-09-20 11:41:00 UTC
It can be worked around either with adding those missing entries to pkg-plist, or fixing the setup.py (until upstream resolves)