* [devel] UA: Re: [re] qt2-ipl3 @ 2000-12-08 21:08 ` Dmitry V. Levin 2000-12-08 22:26 ` Alexander Bokovoy 2000-12-09 3:09 ` aen 0 siblings, 2 replies; 7+ messages in thread From: Dmitry V. Levin @ 2000-12-08 21:08 UTC (permalink / raw) To: devel; +Cc: AB [-- Attachment #1: Type: text/plain, Size: 2505 bytes --] Greetings! On Thu, Dec 07, 2000 at 10:25:49AM +0000, AB wrote: > Стал ставить subj и в ответ получил: пакет Система/Библиотеки не внесен в group index. > Что бы это значило? Это значит, что Вы установили и пользуетесь rpm-3.0.6-ipl11mdk, отличительной особенностью которого является наличие перевода стандартных названий групп пакетов на русский язык. К моему ужасу, в процессе эксплуатации выяснилось, что rpm в принципе не рассчитан на использование более чем одной локали при установке/обновлении/удалении пакетов. Другими словами, если Вы сперва устанавливаете пакет (с переведенным именем группы) в среде с локалью C, а потом удаляете этот пакет с локалью ru_RU.KOI8-R, то Вы со 100% вероятностью получите сообщение: пакет <переведенное имя группы> не внесен в group index. Я сам никогда бы не увидел этой ошибки, ибо всю установку/обновление/удаление пакетов произвожу в локали C. Огромная благодарность автору вопроса за то, что он невольно пролил свет на эту дикую ситуацию. Важно, что проблема носит принципиальный характер, ибо наименование группы вне зависимости от ее дальнейшего использования в программе (будь то внесение в базу данных или показ пользователю) проходит через одну и ту же функцию: int headerGetEntry(Header h, int_32 tag, int_32 * type, void **p, int_32 *c) с входным значением tag == RPMTAG_GROUP. Проблема касается не только групп, но и всех переведенных тэгов. Эта проблема существовала всегда, начиная с момента, как rpm стал поддерживать локализацию имен групп. Просто ввиду отсутствия переводов эта ошибка была очень большой редкостью (не забудьте, что надо еще локаль менять!). В rpm-current (из cvs) интерфейс работы с базой данных изменился значительно, но headerGetEntry остался неизменным, и этой проблемой никто не озабочен. Какие будут предложения? Если клонировать интерфейс, то как именно? Взвешенные идеи приветствуются. Очевидно, я буду поднимать этот вопрос в rpm-list, но этого нет смысла делать, пока у нас не появится работающее решение. Regards, Dmitry +-------------------------------------------------------------------------+ Dmitry V. Levin mailto://ldv@fandra.org Software Engineer PGP pubkey http://www.fandra.org/users/ldv/pgpkeys.html IPLabs Linux Team http://linux.iplabs.ru Fandra Project http://www.fandra.org +-------------------------------------------------------------------------+ UNIX is user friendly. It's just very selective about who its friends are. [-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] UA: Re: [re] qt2-ipl3 2000-12-08 21:08 ` [devel] UA: Re: [re] qt2-ipl3 Dmitry V. Levin @ 2000-12-08 22:26 ` Alexander Bokovoy 2000-12-09 3:09 ` aen 1 sibling, 0 replies; 7+ messages in thread From: Alexander Bokovoy @ 2000-12-08 22:26 UTC (permalink / raw) To: devel [-- Attachment #1: Type: text/plain, Size: 3072 bytes --] On Sat, Dec 09, 2000 at 12:08:51AM +0300, Dmitry V. Levin wrote: > Greetings! > > On Thu, Dec 07, 2000 at 10:25:49AM +0000, AB wrote: > > Стал ставить subj и в ответ получил: пакет Система/Библиотеки не внесен в group index. > > Что бы это значило? > > Это значит, что Вы установили и пользуетесь rpm-3.0.6-ipl11mdk, > отличительной особенностью которого является наличие перевода стандартных > названий групп пакетов на русский язык. > > К моему ужасу, в процессе эксплуатации выяснилось, что rpm в принципе не > рассчитан на использование более чем одной локали при > установке/обновлении/удалении пакетов. > Другими словами, если Вы сперва устанавливаете пакет (с переведенным > именем группы) в среде с локалью C, а потом удаляете этот пакет с локалью > ru_RU.KOI8-R, то Вы со 100% вероятностью получите сообщение: > пакет <переведенное имя группы> не внесен в group index. > > Я сам никогда бы не увидел этой ошибки, ибо всю > установку/обновление/удаление пакетов произвожу в локали C. > Огромная благодарность автору вопроса за то, что он невольно пролил свет > на эту дикую ситуацию. > > Важно, что проблема носит принципиальный характер, ибо наименование группы вне > зависимости от ее дальнейшего использования в программе (будь то внесение > в базу данных или показ пользователю) проходит через одну и ту же функцию: > int headerGetEntry(Header h, int_32 tag, int_32 * type, void **p, int_32 *c) > с входным значением tag == RPMTAG_GROUP. > Проблема касается не только групп, но и всех переведенных тэгов. > > Эта проблема существовала всегда, начиная с момента, как rpm стал > поддерживать локализацию имен групп. Просто ввиду отсутствия переводов эта > ошибка была очень большой редкостью (не забудьте, что надо еще локаль > менять!). > > В rpm-current (из cvs) интерфейс работы с базой данных изменился > значительно, но headerGetEntry остался неизменным, и этой проблемой никто > не озабочен. > > Какие будут предложения? > Если клонировать интерфейс, то как именно? > Взвешенные идеи приветствуются. > Очевидно, я буду поднимать этот вопрос в rpm-list, но этого нет смысла > делать, пока у нас не появится работающее решение. Первое решение -- разделить операции внутреннего взаимодействия с БД и отображения пользователю на две различные функции. headerGetEntry оставить для первой операции, а для второй добавить headerGetEntryDisplay, тем более, что headerGetEntry это всего лишь вызов intGetEntry. Второе решение -- разобраться с вызовами в headerSprintf, которая является интерфейсом верхнего уровня к данным функциям. Здесь также можно повторить клонирование и мне кажется, что здесь оно будет необходимо и, возможно, более удобно. -- Sincerely yours, Alexander Bokovoy The Midgard Project | www.midgard-project.org | Aurora R&D team Minsk Linux Users Group | www.minsk-lug.net | www.aurora-linux.com IPLabs Linux Team | linux.iplabs.ru | Architecte Open Source -- "One lawyer can steal more than a hundred men with guns." -- The Godfather [-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] UA: Re: [re] qt2-ipl3 2000-12-08 21:08 ` [devel] UA: Re: [re] qt2-ipl3 Dmitry V. Levin 2000-12-08 22:26 ` Alexander Bokovoy @ 2000-12-09 3:09 ` aen 2000-12-08 23:21 ` Dmitry V. Levin 1 sibling, 1 reply; 7+ messages in thread From: aen @ 2000-12-09 3:09 UTC (permalink / raw) To: devel "Dmitry V. Levin" wrote: > > Greetings! > > On Thu, Dec 07, 2000 at 10:25:49AM +0000, AB wrote: > > Стал ставить subj и в ответ получил: пакет Система/Библиотеки не внесен в group index. > > Что бы это значило? > > Это значит, что Вы установили и пользуетесь rpm-3.0.6-ipl11mdk, > отличительной особенностью которого является наличие перевода стандартных > названий групп пакетов на русский язык. > > К моему ужасу, в процессе эксплуатации выяснилось, что rpm в принципе не > рассчитан на использование более чем одной локали при > установке/обновлении/удалении пакетов. > Другими словами, если Вы сперва устанавливаете пакет (с переведенным > именем группы) в среде с локалью C, а потом удаляете этот пакет с локалью > ru_RU.KOI8-R, то Вы со 100% вероятностью получите сообщение: > пакет <переведенное имя группы> не внесен в group index. > > А что это означает _содержательно_ ? Что-то плохое? Rgrds, AEN _______________________________________________ Devel mailing list Devel@linux.iplabs.ru http://www.logic.ru/mailman/listinfo/devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] UA: Re: [re] qt2-ipl3 2000-12-09 3:09 ` aen @ 2000-12-08 23:21 ` Dmitry V. Levin 2000-12-09 4:19 ` aen 0 siblings, 1 reply; 7+ messages in thread From: Dmitry V. Levin @ 2000-12-08 23:21 UTC (permalink / raw) To: devel [-- Attachment #1: Type: text/plain, Size: 1623 bytes --] On Sat, Dec 09, 2000 at 06:09:24AM +0300, aen wrote: > > > Стал ставить subj и в ответ получил: пакет Система/Библиотеки не внесен в group index. > > > Что бы это значило? > > > > Это значит, что Вы установили и пользуетесь rpm-3.0.6-ipl11mdk, > > отличительной особенностью которого является наличие перевода стандартных > > названий групп пакетов на русский язык. > > > > К моему ужасу, в процессе эксплуатации выяснилось, что rpm в принципе не > > рассчитан на использование более чем одной локали при > > установке/обновлении/удалении пакетов. > > Другими словами, если Вы сперва устанавливаете пакет (с переведенным > > именем группы) в среде с локалью C, а потом удаляете этот пакет с локалью > > ru_RU.KOI8-R, то Вы со 100% вероятностью получите сообщение: > > пакет <переведенное имя группы> не внесен в group index. > > А что это означает _содержательно_ ? Что-то плохое? Это не смертельно, но плохо: В базе остаются записи, которые должны были бы быть удалены (ибо осуществляется попытка удалить не то, что там есть на самом деле - ведется поиск по неправильному значению ключа). В production system такое недопустимо. Regards, Dmitry +-------------------------------------------------------------------------+ Dmitry V. Levin mailto://ldv@fandra.org Software Engineer PGP pubkey http://www.fandra.org/users/ldv/pgpkeys.html IPLabs Linux Team http://linux.iplabs.ru Fandra Project http://www.fandra.org +-------------------------------------------------------------------------+ UNIX is user friendly. It's just very selective about who its friends are. [-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] UA: Re: [re] qt2-ipl3 2000-12-08 23:21 ` Dmitry V. Levin @ 2000-12-09 4:19 ` aen 2000-12-09 0:31 ` Dmitry V. Levin 0 siblings, 1 reply; 7+ messages in thread From: aen @ 2000-12-09 4:19 UTC (permalink / raw) To: devel "Dmitry V. Levin" wrote: > > > А что это означает _содержательно_ ? Что-то плохое? > > Это не смертельно, но плохо: > В базе остаются записи, которые должны были бы быть удалены (ибо > осуществляется попытка удалить не то, что там есть на самом деле - ведется > поиск по неправильному значению ключа). Вот с этого места -- подробне, пжста. Откуда берется неверное имя ключа? Из-за чего? Из-за другой locale? А кому она, эта locale, нужны _внутри_ программы? Для вывода достаточно LANGUAGE. Для того, чтобы цеплять po -- LC_MESSAGES. Нельзя ли локализовать это место, выставив C? Как, например, при всяесчкой печати, когда выставляется в C LC_NUMERIC, а потом восстанавливается? Это, конечно, общие рассуждения, в тексты сейчас лезть недосуг. Если все не из той оперы -- не обращайте внимание. > > В production system такое недопустимо. Конечно. Rgrds, Алексей. > _______________________________________________ Devel mailing list Devel@linux.iplabs.ru http://www.logic.ru/mailman/listinfo/devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] UA: Re: [re] qt2-ipl3 2000-12-09 4:19 ` aen @ 2000-12-09 0:31 ` Dmitry V. Levin 2000-12-09 5:15 ` aen 0 siblings, 1 reply; 7+ messages in thread From: Dmitry V. Levin @ 2000-12-09 0:31 UTC (permalink / raw) To: devel [-- Attachment #1: Type: text/plain, Size: 2342 bytes --] On Sat, Dec 09, 2000 at 07:19:04AM +0300, aen wrote: > > > А что это означает _содержательно_ ? Что-то плохое? > > > > Это не смертельно, но плохо: > > В базе остаются записи, которые должны были бы быть удалены (ибо > > осуществляется попытка удалить не то, что там есть на самом деле - ведется > > поиск по неправильному значению ключа). > Вот с этого места -- подробне, пжста. Откуда берется неверное имя ключа? > Из-за чего? Из-за другой locale? А кому она, эта locale, нужны _внутри_ > программы? Для вывода достаточно LANGUAGE. Для того, чтобы цеплять po -- > LC_MESSAGES. Нельзя ли локализовать это место, выставив C? Как, > например, при всяесчкой печати, когда выставляется в C LC_NUMERIC, а > потом восстанавливается? Я ведь уже один раз написал: Все операции по извлечению значения тэгов из пакета идут через один интерфейс: headerGetEntry -> intGetEntry -> headerFindI18NString (последние 2 функции статические и, должно быть, Вам они знакомы ;-) радует, что посторонних вызовов нет, и интерфейс полностью локализованный - очевидно, что его кто-то исправил.) Ключевое слово: ВЕСЬ интерфейс. Вызовы этой функции встречаются в 24 .c-файлах, всего в 249 строках. В связи с тем, что 248 - это довольно большое число для ручной правки, возникает мысль, что интерфейс этот надо клонировать, с тем, чтобы в каждом из этих 248 случаев вызывать именно то, что нужно. Например, в файле lib/rpmdb.c, где значения тэгов используются в дальнейшем как ключи для поиска в базе, локализация не нужна, а скажем, в lib/query.c, напротив, скорее всего нужна. Для простоты замены есть смысл сохранить прототип клонированных функций прежним. Резюмирую: если других идей не будет, то для нашей версии rpm это придется делать мне, а для rpm-current пусть jbj делает. :) Так что если есть другие предложения, прошу поактивнее высказывать. Regards, Dmitry +-------------------------------------------------------------------------+ Dmitry V. Levin mailto://ldv@fandra.org Software Engineer PGP pubkey http://www.fandra.org/users/ldv/pgpkeys.html IPLabs Linux Team http://linux.iplabs.ru Fandra Project http://www.fandra.org +-------------------------------------------------------------------------+ UNIX is user friendly. It's just very selective about who its friends are. [-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] UA: Re: [re] qt2-ipl3 2000-12-09 0:31 ` Dmitry V. Levin @ 2000-12-09 5:15 ` aen 0 siblings, 0 replies; 7+ messages in thread From: aen @ 2000-12-09 5:15 UTC (permalink / raw) To: devel "Dmitry V. Levin" wrote: > Я ведь уже один раз написал: Теперь понял. > > > Для простоты замены есть смысл сохранить прототип клонированных функций > прежним. > > Резюмирую: если других идей не будет, то для нашей версии rpm это придется > делать мне, а для rpm-current пусть jbj делает. :) > > Так что если есть другие предложения, прошу поактивнее высказывать. Пока нет. Rgrds, Алексей. > _______________________________________________ Devel mailing list Devel@linux.iplabs.ru http://www.logic.ru/mailman/listinfo/devel ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2000-12-09 5:15 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2000-12-08 21:08 ` [devel] UA: Re: [re] qt2-ipl3 Dmitry V. Levin 2000-12-08 22:26 ` Alexander Bokovoy 2000-12-09 3:09 ` aen 2000-12-08 23:21 ` Dmitry V. Levin 2000-12-09 4:19 ` aen 2000-12-09 0:31 ` Dmitry V. Levin 2000-12-09 5:15 ` aen
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git