문제

Linux version 2.6.18-131.el5 gcc version 4.1.2 RPM version 4.4.2.3

I use the following command to build packages: $ sudo rpmbuild -ba xxx.spec

I thought that the debuginfo package should be built by default, but only get the xxx.src.rpm and xxx.x86_64.rpm, with no debuginfo package.

Then I add a line in my xxx.spec, "#%debug_package":

enter image description here

Then the debug package is built! But I thought that a line with a '#' in the front is considered as comment! How does this work?

I'm totally confused.

도움이 되었습니까?

해결책

This is one of the most annoying "features" in rpm and it gets people all the time. The # is only commenting out the first line of a multi-line macro. The proper way to comment it out would be

#%%debug_package

The first % escapes the second; the result after macro becomes what you wanted.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top