From 5660c0ede950313a685ee1a60d0013e84f87a978 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 14 Apr 2008 12:55:12 +0000 Subject: [PATCH] EULA is also a translatable text. Also compress translated versions of compressible attributes. --- tools/common_write.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/common_write.c b/tools/common_write.c index ced7928..7be42d2 100644 --- a/tools/common_write.c +++ b/tools/common_write.c @@ -33,6 +33,7 @@ static char *languagetags[] = { "solvable:description:", "solvable:messageins:", "solvable:messagedel:", + "solvable:eula:", 0 }; @@ -42,11 +43,16 @@ static int keyfilter_solv(Repo *data, Repokey *key, void *kfdata) { int i; + const char *keyname; if (test_separate && key->storage != KEY_STORAGE_SOLVABLE) return KEY_STORAGE_DROPPED; for (i = 0; verticals[i]; i++) if (key->name == verticals[i]) return KEY_STORAGE_VERTICAL_OFFSET; + keyname = id2str(data->pool, key->name); + for (i = 0; languagetags[i] != 0; i++) + if (!strncmp(keyname, languagetags[i], strlen(languagetags[i]))) + return KEY_STORAGE_VERTICAL_OFFSET; return KEY_STORAGE_INCORE; } @@ -54,11 +60,16 @@ static int keyfilter_attr(Repo *data, Repokey *key, void *kfdata) { int i; + const char *keyname; if (key->storage == KEY_STORAGE_SOLVABLE) return KEY_STORAGE_DROPPED; for (i = 0; verticals[i]; i++) if (key->name == verticals[i]) return KEY_STORAGE_VERTICAL_OFFSET; + keyname = id2str(data->pool, key->name); + for (i = 0; languagetags[i] != 0; i++) + if (!strncmp(keyname, languagetags[i], strlen(languagetags[i]))) + return KEY_STORAGE_VERTICAL_OFFSET; return KEY_STORAGE_INCORE; } -- 2.7.4