Bug 135097 - error: Macro % has illegal name (%define)
Summary: error: Macro % has illegal name (%define)
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm
Version: 3.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-08 16:38 UTC by Marius Onica
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-08 20:26:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marius Onica 2004-10-08 16:38:30 UTC
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:

Comment 1 Jeff Johnson 2004-10-08 20:26:43 UTC
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.

Comment 2 Marius Onica 2004-10-11 10:10:13 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.