From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20041001 Description of problem: After installing an up to day updated Linux Enterprise Linux AS with rpm version 4.2.3-10 I receive this: error: Macro % has illegal name (%define). Apart from that message everything seems normal. If you make an upgrade to an older rpm package (aka if you have an older install and upgrade to date) this bug doesn't appear, only if we made a fresh install. From gdb: 286 (void) poptReadConfigFile(optCon, LIBRPMALIAS_FILENAME); (gdb) 287 (void) poptReadDefaultConfig(optCon, 1); (gdb) 288 poptSetExecPath(optCon, RPMCONFIGDIR, 1); (gdb) 290 while ((arg = poptGetNextOpt(optCon)) > 0) { (gdb) 300 if (arg < -1) { (gdb) 307 rpmcliConfigured(); (gdb) error: Macro % has illegal name (%define) 330 if (bigMode == MODE_UNKNOWN || (bigMode & MODES_DB)) { (gdb) 331 if (da->init) { (gdb) 337 if (da->rebuild) { Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.launch rpm with or without arguments 2. 3. Additional info:
There's a typo in some macro initialization file, perhaps redhat-rpm-config, perhaps some other package, perhaps in local customization. Try "strace -o /tmp/xxx rpm --showrc", then look at the open's in /tmp/xxx, looking for the open just before the error message, to identify which file has a problem.
Thanks for help. After some digging I found that the file /etc/rpm/macros.solve has wrong content, namely: #The path to the dependency universe database. The default value #is the rpmdb-redhat location. The macro is usually defined in #/etc/rpm/macros.solve, installed with the rpmdb-redhat package. /usr/lib/rpmdb/i386-redhat-linux/redhat usr/lib/rpmdb/i386-redhat-linux/redhat #The path to the dependency universe packages. This should #be a path to the packages contained in the solve database. /mnt/redhat/test/latest-i386/RedHat/RPMS/ /mnt/redhat/test/latest-i386/RedHat/RPMS/ #The output binary package file name template used when suggesting #binary packages that solve a dependency. The macro is usually defined #in /etc/rpm/macros.solve, installed with the rpmdb-redhat package. # # XXX Note: escaped %% for use in headerSprintf() %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm /mnt/redhat/test/latest-i386/RedHat/RPMS/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm . After modifying the following in rpmdb-redhat.spec.in : %_solve_dbpath -> %%_solve_dbpath %_solve_pkgsdir -> %%_solve_pkgsdir %_solve_name_fmt -> %%_solve_name_fmt %{?_solve_pkgsdir} -> %%{?_solve_pkgsdir} everything is ok.