[In the event of any reply, please CC me.]

Hi!

I encountered a few silly errors with my package that I could have prevented,
and I wish to share my experiences to the rest.

I had the idea to finally separate the build-dependencies between
Build-Depends and Build-Depends-Indep in debian/control.  The criterion is the
following: put in Build-Depends all those packages that are absolutely
necessary to build architecture-dependent files (e.g. you compile a few .c
files into executable binaries).  The rest goes into Build-Depends-Indep.

Packages that absolutely go into B-D are debhelper (and dpatch).

A simple pbuilder will not check whether you have correctly separated them.
If you just upload those packages, then you will find out pretty soon that the
Debian machines have failed to properly compile your package(s).

So how do you check yourself whether the operation will be successful?  Very
simple.  Install the package "cowdancer" if you haven't already.  I got the
following lines from one of my uploaders (adapted slightly):

sudo cowbuilder --create  # if it's your first time using cowbuilder
sudo cowbuilder --update
sudo cowbuilder --login

As root, go to another console or terminal and copy your .orig.tar.gz, .dsc
and perhaps also your .diff.gz file to 
/var/cache/pbuilder/build/cow.[pid]/root/ .

Go back to your cowbuilder login, cd to root/ and run "dpkg-source -x
foo.dsc".  Then do an "apt-get install" for all the packages in Build-Dependent.

Now here's the part that I forgot: debian/rules usually has a binary-arch and
binary-indep target.  Run "debian/rules clean binary-arch" and now you can
check whether the package will also run fine on a Debian autobuilder.

Also, don't forget to put all the arch-independent packages in your
binary-indep target in debian/rules.  You just add the same commands from
binary-arch, like dh_testroot, etc.  It doesn't break things if you put
everything in binary-arch, but it will prevent the autobuilders from building
an arch-independent package that you (or your mentor) has already uploaded.
Give those autobuilders a break. ;)


Voilà, I hope this explanation might prove helpful for someone. =)



Danai SAE-HAN (韓達耐)
--
題目:《書湖陰先生壁》
作者:王安石(1021-1086)

茅檐長掃靜無苔,花木成畦手自栽。
一水護田將綠繞,兩山排闥送青來。

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to