Description of Problem: RPM substitues information from specspo even when the text being replaced is substantially different from the original text whose translation is stored in specspo. This is very confusing. How Reproducible: Easily. :) Steps to Reproduce: 1. Install specspo. 2. Build a package whose name is identical to one of the packages whose data are included in specspo but make its summary or description different from the data in specspo. Let's call the resulting file pkg-2.0.i386.rpm. 3a. Run rpm -qip pkg-2.0.i386.rpm 3b. Run rpm -U pkg-2.0.i386.rpm; rpm -qi pkg Actual Results: The summary and the description printed by rpm (and perhaps other fields as well) are those from specspo, not those from the file. This is very confusing. Setting LANG or LC_* to C won't help as long as rpm finds localized data for en_US. The only way to defeat specspo I have been able to find so far is ``--define _i18ndomains=''. Expected Results: The real data from pkg-1.0.i386.rpm, of course. I am aware it is the purpose of specspo to replace texts in the package metadata with their translations but rpm should not do it blindly--at least it ought to provide some indication the translation does not match the real data. Moreover LC_ALL=C should inhibit the use of specspo the same way it is supposed to inhibit other i18n related functionality. Additional Information: Tested versions: rpm-4.0.2-6x, rpm-4.0.3-0.88 from Raw Hide.
Agreed confusing if specspo is installed. However, the expectation "real data from pkg-1.0.i386.rpm" is, in fact, naive, as there have been no translations in package metadata since Red Hat 6.2. You will always get exactly what's in the package, basically the C locale, and nothing else, as that's all that's in the package. This is identical to uninstalling specspo, i.e. having no translations at all. AFAIK, LANG=C works just fine, but returns the specspo msgid, not the text in the header. See previous and uninstall specspo if desired. Other, 3rd party packages not included in specspo, always retrieve data from the header. Factoring Descrioption/Summary/Group to specspo leads to a more manageable i18n process, and permits updated translations to be distributed w/o rebuilding all packages. Modifying text for a package is no more complicated than any other .PO task.
> AFAIK, LANG=C works just fine, but returns the specspo > msgid, not the text in the header. $ LC_ALL=C strace -e trace=open ./rpm -q --queryformat '%{DESCRIPTION}\n' rpm open("/usr/local/lib/rpm/rpmpopt-4.0.3", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/popt", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/kan/.popt", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/rpm/rpmrc", O_RDONLY) = 3 open("/etc/rpmrc", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/kan/.rpmrc", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/rpm/macros", O_RDONLY) = 3 open("/usr/lib/rpm/i686-linux/macros", O_RDONLY) = 3 open("/etc/rpm/macros.specspo", O_RDONLY) = 3 open("/etc/rpm/macros.db1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/rpm/macros", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/rpm/i686-linux/macros", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/kan/.rpmmacros", O_RDONLY) = 3 open("/var/lib/rpm/Packages", O_RDONLY) = 3 open("/var/lib/rpm/Packages", O_RDONLY) = 3 open("/var/lib/rpm/Name", O_RDONLY) = 4 open("/var/lib/rpm/Name", O_RDONLY) = 4 open("/usr/share/locale/locale.alias", O_RDONLY) = 5 open("/usr/share/i18n/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US/LC_MESSAGES/redhat-dist.mo", O_RDONLY) = 5 The RPM Package Manager (RPM) is a powerful command line driven package management system capable of installing, uninstalling, verifying, querying, and updating software packages. Each software package consists of an archive of files along with information about the package like its version, a description, etc. With LC_ALL=C, /usr/share/locale/en_US (en_US!!!) should be off-limits. > Factoring Descrioption/Summary/Group to specspo leads to a > more manageable i18n process, and permits updated translations > to be distributed w/o rebuilding all packages. Modifying text > for a package is no more complicated than any other .PO > task. I do not expect you will get rid of specspo. I suggest rpm should be a little bit less ignorant when using the translations from specspo. Let's say package pkg-1.0 used to have this description: This is a package called PKG. It makes foo and bar. Now, someone made a translation, say, to the Czech language: Toto je balik jmenem PKG. Dela to foo a bar. Let's assume this translation (as well as the original text) is included in specspo. But I decide to to replace pkg-1.0 with much cooler pkg-2.0 whose description is different: This is the second version of PKG. It foos, bars and bazzes. It can frobnicate things too. Now, I expect rpm -qi won't silently replace this with an outdated translation (esp. an outdated "en_US translation") from specspo but it will at least give me a warning the text it provides may be incorrect.