I've found that when %_topdir is defined with a trailing slash, rpmbuild creates debuginfo subpackages without the sources inside.<br><br>With this line inside ~/.rpmmacros:<br>%_topdir      %(echo $HOME)/rpmbuild/<br>

or something more complex, like this:<br>%_topdir      %(echo $HOME)/rpmbuild/./../rpmbuild/./<br><br>You end up with a debuginfo without the sources inside.<br><br>But this works fine:<br>%_topdir      %(echo $HOME)/rpmbuild<br>

<br>If you want to try for yourself:<br><br>[root@localhost ~]# rpmbuild --define="%_topdir /root/rpmbuild/" -ba ~/rpmbuild/SPECS/ed.spec >& /dev/null &&rpm -qpl /root/rpmbuild/RPMS/i386/ed-debuginfo-1.5-2.i386.rpm <br>

/usr/lib/debug<br>/usr/lib/debug/bin<br>/usr/lib/debug/bin/ed.debug<br>[root@localhost ~]# rpmbuild --define="%_topdir /root/rpmbuild" -ba ~/rpmbuild/SPECS/ed.spec >& /dev/null &&rpm -qpl /root/rpmbuild/RPMS/i386/ed-debuginfo-1.5-2.i386.rpm <br>

/usr/lib/debug<br>/usr/lib/debug/bin<br>/usr/lib/debug/bin/ed.debug<br>/usr/src/debug/ed-1.5<br>/usr/src/debug/ed-1.5/buffer.c<br>/usr/src/debug/ed-1.5/carg_parser.c<br>/usr/src/debug/ed-1.5/carg_parser.h<br>/usr/src/debug/ed-1.5/ed.h<br>

/usr/src/debug/ed-1.5/global.c<br>/usr/src/debug/ed-1.5/io.c<br>/usr/src/debug/ed-1.5/main.c<br>/usr/src/debug/ed-1.5/main_loop.c<br>/usr/src/debug/ed-1.5/regex.c<br>/usr/src/debug/ed-1.5/signal.c<br>[root@localhost ~]# <br>

<br>I have tracked down the problem to the debugedit tool. It compares the path base_dir (-b) provided in the command line with the path that came from the debug symbols. Since the debug symbols points to absolute paths, it gets confused if fed with a relative path.<br>

The find-debuginfo.sh use the RPM_BUILD_DIR, and this is not always an absolute path. I've found that I got a double /:<br>+ echo /usr/lib/rpm/debugedit -b /home/User/rpmbuild//BUILD -d /usr/src/debug -i -l /home/User/rpmbuild//BUILD/ed-1.5/debugsources.list /home/User/rpmbuild/BUILDROOT/ed-1.5-2.fc15.i386/bin/ed<br>

And this triggers the problem.<br>Some except from  find-debuginfo.sh:<br>    201   echo "extracting debug info from $f"<br>    202   id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \<br>

    203                               -i -l "$SOURCEFILE" "$f")<br><br>I am sending a patch that makes debugedit always use the absolute path. I'm no sure that this is the best way to do it, since I have not spent enough time figuring out what debugedit does in detail, but with this patch any path seems to work now.<br>

<br>