summaryrefslogtreecommitdiff
path: root/build/rpmfc.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-09-01 10:40:50 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-09-01 10:40:50 +0300
commit457606983f6053eb3c053ea564937f184d2b9154 (patch)
treedeb6647ef3b67edb10ad29ec3d65a15e4b4bc169 /build/rpmfc.c
parentc3770c9404ffa2fcfbe0869dd7fbdb73466a637a (diff)
downloadlibrpm-tizen-457606983f6053eb3c053ea564937f184d2b9154.tar.gz
librpm-tizen-457606983f6053eb3c053ea564937f184d2b9154.tar.bz2
librpm-tizen-457606983f6053eb3c053ea564937f184d2b9154.zip
Further file-classifier tweaks
- disable "known tokens" lookups in ascii files, this is way too unreliable to do anything but cause pain - consider text files as RPMFC_TEXT consistently - font metrics files are not fonts
Diffstat (limited to 'build/rpmfc.c')
-rw-r--r--build/rpmfc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 1bcc6ecae..e1fe471a4 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -484,6 +484,7 @@ static const struct rpmfcTokens_s const rpmfcTokens[] = {
{ "RPM v4", RPMFC_ARCHIVE|RPMFC_INCLUDE },
{ " image", RPMFC_IMAGE|RPMFC_INCLUDE },
+ { " font metrics", RPMFC_WHITE|RPMFC_INCLUDE },
{ " font", RPMFC_FONT|RPMFC_INCLUDE },
{ " Font", RPMFC_FONT|RPMFC_INCLUDE },
@@ -496,19 +497,14 @@ static const struct rpmfcTokens_s const rpmfcTokens[] = {
{ "SGML", RPMFC_WHITE|RPMFC_INCLUDE },
{ "XML", RPMFC_WHITE|RPMFC_INCLUDE },
- { " program text", RPMFC_WHITE|RPMFC_INCLUDE },
{ " source", RPMFC_WHITE|RPMFC_INCLUDE },
{ "GLS_BINARY_LSB_FIRST", RPMFC_WHITE|RPMFC_INCLUDE },
{ " DB ", RPMFC_WHITE|RPMFC_INCLUDE },
- { "ASCII English text", RPMFC_WHITE|RPMFC_INCLUDE },
- { "ASCII text", RPMFC_WHITE|RPMFC_INCLUDE },
- { "ISO-8859 text", RPMFC_WHITE|RPMFC_INCLUDE },
-
{ "symbolic link to", RPMFC_SYMLINK },
{ "socket", RPMFC_DEVICE },
{ "special", RPMFC_DEVICE },
- { " text", RPMFC_TEXT },
+ { " text", RPMFC_TEXT|RPMFC_INCLUDE },
{ "ASCII", RPMFC_WHITE },
{ "ISO-8859", RPMFC_WHITE },
@@ -1211,7 +1207,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
size_t slen;
int fcolor;
int xx;
- int msflags = MAGIC_CHECK | MAGIC_COMPRESS;
+ int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS;
magic_t ms = NULL;
if (fc == NULL || argv == NULL)