Bug 96955

Summary: I get "error: Package already exists: %package debuginfo" with -ta
Product: [Retired] Red Hat Linux Reporter: Marcelo Roberto Jimenez <mroberto>
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-10 19:06:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcelo Roberto Jimenez 2003-06-06 22:34:56 UTC
From Bugzilla Helper:
User-Agent: Opera/7.11 (Linux 2.4.20-18.9smp i686; U)  [en]

Description of problem:
I run:
% rpmbuild -ta tarball-0.11.4.tar.bz2
and I get:
error: Package already exists: %package debuginfo

There is no such string in any file in my home directory (debuginfo). This 
stopped working after I upgraded RH8.0 to RH9.

My only clue: If I run:
% grep -ir debuginfo /usr/lib/rpm
I get:
/usr/lib/rpm/macros:   /usr/lib/rpm/find-debuginfo.sh %{_builddir}/%{?
buildsubdir}\
/usr/lib/rpm/find-debuginfo.sh:#find-debuginfo.sh - automagically generate debug 
info and file list
/usr/lib/rpm/redhat/macros:%package debuginfo \
/usr/lib/rpm/redhat/macros:%description debuginfo\
/usr/lib/rpm/redhat/macros:%files debuginfo -f debugfiles.list\


Version-Release number of selected component (if applicable):
rpm-build-4.2-0.69

How reproducible:
Always

Steps to Reproduce:
1.rpmbuild -ta tarball-0.11.4.tar.bz2
2.
3.
    

Actual Results:  error: Package already exists: %package debuginfo

Expected Results:  It should have created my rpm

Additional info:

Comment 1 Marcelo Roberto Jimenez 2003-06-09 23:18:42 UTC
I have copyed the files

/usr/lib/rpm/redhat/macros
/usr/lib/rpm/redhat/rpmrc

from the package redhat-rpm-config-8.0-1.noarch.rpm to their proper directory 
and the problem was solved. This seems to configure a bug not in rpm-build, but 
in redhat-rpm-config, so I believe that this bug should be reassigned to the 
latter package.


Comment 2 Jeff Johnson 2003-06-10 19:06:44 UTC
Yes.

redhat-rpm-config is overloading %foo section markers with
macros. That means that if you, day, have innocent %install
in a comment, then redhat-rpm-config will cause that token
to be expanded into several lines of text that can/will cause
strange behavior.

Comment 3 Marcelo Roberto Jimenez 2003-06-10 19:47:57 UTC
Jeff,

You are correct. There was a %install in the changelog and that was causing the
error.

Thanks for your help.