Bug 249255 - devel/tortoisehg: Python autoplist generates invalid items
Summary: devel/tortoisehg: Python autoplist generates invalid items
Status: Closed FIXED
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:
Depends on:
Blocks:
 
Reported: 2020-09-11 14:43 UTC by Gleb Popov
Modified: 2021-03-22 04:20 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 freebsd_triage 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 freebsd_triage 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)
Comment 5 Gleb Popov freebsd_committer freebsd_triage 2021-03-20 10:38:07 UTC
Closing, as it is not our bug, but an upstream one. Reported it here: https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5705
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2021-03-21 06:45:52 UTC
We can and should fix the bug our end until upstream does. The fix here is to add the files to pkg-plist (autoplist and pkg-plist are complementary/cumulative, and can be used together)
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2021-03-21 06:46:44 UTC
@Gleb If you're not keen to resolve the issue (add the pkg-plist entries) feel free to re-assign to me or python@
Comment 8 Gleb Popov freebsd_committer freebsd_triage 2021-03-21 08:29:37 UTC
(In reply to Kubilay Kocak from comment #7)
It'd great if you do that!
Comment 9 Gleb Popov freebsd_committer freebsd_triage 2021-03-21 08:32:30 UTC
Wait, I probably understood you wrong.

I already worked around this problem in our ports tree, but delegated proper fix to upstream. Are willing to submit a proper fix?
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2021-03-22 01:44:55 UTC
Looks like this was resolved in ports r548242 via bug 249160

@Gleb If that's indeed the correct changeset, we consider the bug report (of the packaging failure) 'closed -> FIXED', as it was fixed via a change (commit), and feel free to close if so.

I'm think its fine to wait for upstream to correct it while we carry local patches that resolves downstream.
Comment 11 Gleb Popov freebsd_committer freebsd_triage 2021-03-22 04:20:21 UTC
(In reply to Kubilay Kocak from comment #10)

> @Gleb If that's indeed the correct changeset, we consider the bug report (of the packaging failure) 'closed -> FIXED', as it was fixed via a change (commit), and feel free to close if so.

That's correct, closing it.