[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Override dh_builddeb destdir causes dpkg-genbuildinfo to fail



Hi,

I am trying to package my Python application into a Debian package. So far this is successful in that I get a binary .deb in the parent directory of my application directory. I would like to change this so that all .debs are placed in a different directory so I tried overriding 'dh_builddeb' in 'rules':

override_dh_builddeb:
    mkdir ./deb_package
    dh_builddeb --destdir=./deb_package

This successfully puts the package in the desired directory but the next stage of the packaging fails:

dh_gencontrol
dpkg-gencontrol: warning: unknown information field 'Version' in input data in package's section of control info file
dpkg-gencontrol: warning: package skriblr: substitution variable ${shlibs:Depends} unused, but is defined
dpkg-gencontrol: warning: unknown information field 'Version' in input data in package's section of control info file
dpkg-gencontrol: warning: package skriblr: substitution variable ${shlibs:Depends} unused, but is defined
   dh_md5sums
   debian/rules override_dh_builddeb
make[1]: Entering directory '/home/kerry/PycharmProjects/pydraw'
mkdir ./deb_package
dh_builddeb --destdir=./deb_package
dpkg-deb: building package 'skriblr' in './deb_package/skriblr_0.1-1_amd64.deb'.
dpkg-deb: building package 'skriblr-dbgsym' in 'debian/.debhelper/scratch-space/build-skriblr/skriblr-dbgsym_0.1-1_amd64.deb'.
    Renaming skriblr-dbgsym_0.1-1_amd64.deb to skriblr-dbgsym_0.1-1_amd64.ddeb
make[1]: Leaving directory '/home/kerry/PycharmProjects/pydraw'
 dpkg-genbuildinfo --build=binary
dpkg-genbuildinfo: error: cannot fstat file ../skriblr-dbgsym_0.1-1_amd64.ddeb: No such file or directory
dpkg-buildpackage: error: dpkg-genbuildinfo --build=binary subprocess returned exit status 255

The cause of the failure is obvious but I cannot find how to specify a different input directory to 'dpkg-genbuildinfo'. Is there another dh_*** function I need to override to do this or something else?

As an alternate means I tried moving the .deb at the end of override_dh_builddeb:

override_dh_builddeb:
    rm -rf ./deb_package
    mkdir ./deb_package
    dh_builddeb
    mv ../skriblr*.deb ./deb_package
    mv ../skriblr*.ddeb ./deb_package

But this causes a similar issue to above:

dh_gencontrol
dpkg-gencontrol: warning: unknown information field 'Version' in input data in package's section of control info file
dpkg-gencontrol: warning: package skriblr: substitution variable ${shlibs:Depends} unused, but is defined
dpkg-gencontrol: warning: unknown information field 'Version' in input data in package's section of control info file
dpkg-gencontrol: warning: package skriblr: substitution variable ${shlibs:Depends} unused, but is defined
   dh_md5sums
   debian/rules override_dh_builddeb
make[1]: Entering directory '/home/kerry/PycharmProjects/pydraw'
rm -rf ./deb_package
mkdir ./deb_package
dh_builddeb
dpkg-deb: building package 'skriblr' in '../skriblr_0.1-1_amd64.deb'.
dpkg-deb: building package 'skriblr-dbgsym' in 'debian/.debhelper/scratch-space/build-skriblr/skriblr-dbgsym_0.1-1_amd64.deb'.
    Renaming skriblr-dbgsym_0.1-1_amd64.deb to skriblr-dbgsym_0.1-1_amd64.ddeb
mv ../skriblr*.deb ./deb_package
mv ../skriblr*.ddeb ./deb_package
make[1]: Leaving directory '/home/kerry/PycharmProjects/pydraw'
 dpkg-genbuildinfo --build=binary
dpkg-genbuildinfo: error: cannot fstat file ../skriblr-dbgsym_0.1-1_amd64.ddeb: No such file or directory
dpkg-buildpackage: error: dpkg-genbuildinfo --build=binary subprocess returned exit status 255

Thanks,

Kerry


Reply to: