RPM homepage link
Home
Up

  

Addressing: error: Package already exists: %package debuginfo


When building SRPMs prepared prior to rpm-4.2, the effort occasionally fail with this confusing message:
error: Package already exists: %package debuginfo This is an artifact of the addition of changes in the macro expansions which scan for an %install stanza, and produce a new -debuginfo result package. It is sensitive to, and complains about 'extra' %install stanzas.

Unfortunately, it is a bit over-sensitive as to what is actuially a %install stanza.

It picks up a %install in a comment line -- and this triggers the error message and stops the build. This is a correct behaviour in that the macro expansion logic does some substitutions which can remove from the scope of a comment the results of an expanded %install; but it is disconcerting.

Let's walk through an example, and the fix:
[herrold@gateway2000 SPECS]$ rpmbuild -ba xfce.spec error: Package already exists: %package debuginfo herrold@gateway2000 SPECS]$ cp xfce.spec xfce.spec.nodebuginfofix herrold@gateway2000 SPECS]$ joe xfce.spec Processing '/etc/joe/joerc'...done Processing '/etc/joe/joerc'...done [herrold@gateway2000 SPECS]$ diff -u xfce.spec.nodebuginfofix xfce.spec --- xfce.spec.nodebuginfofix 2003-10-10 09:05:36.000000000 -0400 +++ xfce.spec 2003-10-10 09:05:58.000000000 -0400 @@ -155,7 +155,7 @@ - general cleanups to make it a bit easier to maintain - configure to build section - quiet setup -- no more %pre/preun or %post/postun sections, not needed (done in %install instead) +- no more %pre/preun or %post/postun sections, not needed (done in %_install instead) - no more posinstall messages being displayed - cleaned up %files section - gzip man pages [herrold@gateway2000 herrold]$ rpmbuild --rebuild xfce-3.8.18-1.src.rpm Installing xfce-3.8.18-1.src.rpm [... big snip ...] + cd /home/herrold/rpmbuild/BUILD + rm -rf xfce-3.8.18 + exit 0 [herrold@gateway2000 herrold]$ cat /etc/redhat-release Red Hat Linux release 9 (Shrike) [herrold@gateway2000 herrold]$ ... and we have a clean rebuild on RHL 9.

Other voices: Post from hylafax-users mailing list

Last updated: Fri, 10 Oct 2003 22:28:39 -0400

Back to Top page
Maintained by Owl River Company -- Comments to: rpm editor, please.