https://bugzilla.redhat.com/show_bug.cgi?id=156477
Carlos O'Donell codonell@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |ASSIGNED Resolution|RAWHIDE |--- Flags| |needinfo?(mfabian@redhat.co | |m)
--- Comment #45 from Carlos O'Donell codonell@redhat.com --- (In reply to Panu Matilainen from comment #44)
Um, one should *never* modify /usr/lib/rpm/macros, that's a "factory config" setting and any changes will be overwritten on rpm upgrades. Local settings go into /etc/rpm files.
Agreed. Which is why I asked Edgar Hoch to file a new bug for rpm if it wasn't already solvable. I expect it is simply by setting the macros in /etc/rpm.
As for how I ended up in this bug... this change broke copr. I dont know what ancient OS it runs on, perhaps RHEL-6, but the rpm there doesn't support scriptlet expansion so glibc, and thus everything, is uninstallable now due to: DEBUG util.py:388: ERROR You need to update rpm to handle: DEBUG util.py:388: rpmlib(ScriptletExpansion) <= 4.9.0-1 is needed by glibc-common-2.21.90-5.fc23.x86_64
I'm really sorry about that, that was an unforseen consquence, but the truth is that Rawhide will continue to move forward picking up features, either it happens now or it happens later.
Mostly this is really copr's headache, not yours, but in this case there's no actual need to use scriptlet expansion, because from lua you can always expand macros. Something like this (and the same for the triggerin) would avoid the rpmlib dependency without affecting the functionality:
-%post common -e -p <lua> +%post common -p <lua> if posix.access("/etc/ld.so.cache") then if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then pid = posix.fork() if pid == 0 then
posix.exec("%{_prefix}/sbin/build-locale-archive", "--install-langs",
"%%{_install_langs}")
posix.exec("%{_prefix}/sbin/build-locale-archive", "--install-langs",
rpm.expand("%%{_install_langs}")) elseif pid > 0 then posix.wait(pid) end
I believe we tried this before but it had some negative consequences. I'm going to ask Fabian to comment and test it out.
Mike,
Do you remember if we talked about using rpm.expand and then didn't?
i18n-bugs@lists.fedoraproject.org