File magic strings are unreliable and largely unusable for anything but human 
consumption, MIME types are far more meaningful for classifying file types. 
Populate RPMTAG_FILECLASS (or rather, CLASSDICT) with MIME type instead, and 
add types for all files and not just our strange hardcoded list. Remove now 
redundant cruft.
    
Fixes: #1096

Note that this is only an RFC as a basis of discussion. I know we want to 
include MIME data, but I'm not sure we can just replace the cruft that is 
currently going into RPMTAG_CLASSDICT. OTOH I'd really rather not duplicate 
all that to another tag set just to preserve cruft that almost nobody uses 
(AFAIK). 

Thoughts?
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1099

-- Commit Summary --

  * Use libelf for determining file colors
  * Support file classification by MIME type
  * Add a simple test for fileclass data
  * Use MIME types instead of magic strings for RPMTAG_FILECLASS

-- File Changes --

    M build/rpmfc.c (167)
    M tests/rpmbuild.at (47)
    M tests/rpmsigdig.at (6)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1099.patch
https://github.com/rpm-software-management/rpm/pull/1099.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1099
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to