Summary: | MIME type confusion: (at least) dev-vcs/subversion-1.14.2-r1 defaults to binary for ebuilds etc | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Joe Breuer <gentoo> |
Component: | Current packages | Assignee: | Andreas K. Hüttel <dilfridge> |
Status: | RESOLVED CANTFIX | ||
Severity: | normal | CC: | dilfridge |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Joe Breuer
2023-12-05 07:46:01 UTC
(In reply to Joe Breuer from comment #0) > I have a local overlay repo that's (still... nothing stays around longer > than a temporary fix) version controlled using subversion. > > When I added a new ebuild today, I noticed that subversion defaults to > treating (at least) ebuilds and Manifests as binary files (which in turn, as > I understand it, makes diff/patch not work as expected etc.) > > I traced this to subversion identifying those files with MIME types of > application/vnd.gentoo.ebuild and application/vnd.gentoo.manifest, > respectively. They're actually officially registered! :) https://marc.info/?l=gentoo-dev&m=166245650202553&w=2 (They've since been ratified or whatever.) > > Manually setting the MIME type is a workaround: > $ svn propset svn:mime-type text/plain *.ebuild Manifest > > I guess some system wide MIME configuration system has been upgraded to a > point where it identifies the gentoo specific files with the above-mentioned > MIME types. > I can't help but wonder whether application/... is a good category for > those, since those files are, in fact, text-based - why is it not > text/...manifest and text/...ebuild? (What are the MIME type conventions for > source code etc. like, anyway...?) This is either beyond me, or I've forgotten, but IIRC application/ is right for it. > > Does subversion simply look at the category (application/... vs text/...), > or is there more going on? Does it have a compiled-in list of MIME types > that should NOT be treated as binary, that could be patched? > Maybe we're triggering something around here https://github.com/apache/subversion/blob/256922fa2eeda6bfb4354a32933da57baf0afeff/subversion/libsvn_subr/magic.c#L143? Well, (as far as I understand) all parts are working as designed. The interplay is the problem... https://svnbook.red-bean.com/en/1.7/svn.advanced.props.file-portability.html#svn.advanced.props.special.mime-type You can * either use --force for diff etc, * or override the mimetype for ebuilds, e.g. setting it to text/plain This is not really something we can fix here. |