<div dir="ltr"><div>Package: pbuilder</div><div>Version: 0.213ubuntu1</div><div><br></div><div>  I rebuild packages with pbuilder,things work fine in most cases.But when there is an empty line before "Source"  field in control file, getting build-depends list from control will return null.for example:libnotify4.</div>
<div>"</div><div>Package: pbuilder-satisfydepends-dummy</div><div>Version: 0.invalid.0</div><div>Architecture: amd64</div><div>Maintainer: Debian Pbuilder Team <<a href="mailto:pbuilder-maint@lists.alioth.debian.org">pbuilder-maint@lists.alioth.debian.org</a>></div>
<div>Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder</div><div> This package was created automatically by pbuilder to satisfy the</div><div> build-dependencies of the package being currently built.</div>
<div>dpkg-deb: building package `pbuilder-satisfydepends-dummy' in `/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'.</div><div>"</div><div>As we can see ,there is no Build-Depends in pbuilder-satisfydepends-dummy's control file.</div>
<div>I read the code about getting dependencies from control, see sed stop reading input lines from control file when matching empty line"/^$/q",then I add one line to delete the empty line,if any, before Source field. After this, pbuilder goes well.</div>
<div><br></div><div>"</div><div>diff -uNrp pbuilder.old/usr/lib/pbuilder/pbuilder-satisfydepends-funcs pbuilder/usr/lib/pbuilder/pbuilder-satisfydepends-funcs</div><div>--- pbuilder.old/usr/lib/pbuilder/pbuilder-satisfydepends-funcs 2014-02-25 16:57:24.232902148 +0800</div>
<div>+++ pbuilder/usr/lib/pbuilder/pbuilder-satisfydepends-funcs     2014-03-07 13:11:58.636577252 +0800</div><div>@@ -49,7 +49,10 @@ checkbuilddep_versiondeps() {</div><div>     # cannot satisfy depends</div><div>     return 1;</div>
<div> }</div><div>-</div><div> </div><div>+# fix bug : delele empty line before Source.</div><div>+# $DEBIAN_CONTROL can either be source.dsc or control file</div><div>+# if there is an empty line before Source in control,return null--error</div>
<div> get_source_control_field() {</div><div>     local field="$1"</div><div>@@ -61,6 +64,7 @@ t store</div><div>     /^$/ d</div><div>     b pgploop</div><div> }</div><div>+/^$/{N;/Source/s/\nSource/Source/}</div>
<div> /^$/q</div><div> d</div><div> : store</div><div><br></div><div>"</div><div><br></div></div>