--- Begin Message ---
- To: Theodore Ts'o <tytso@mit.edu>
- Subject: Re: [PATCH] Fix parallel FTBFS
- From: Philipp Hahn <hahn@univention.de>
- Date: Mon, 13 Feb 2017 08:51:19 +0100
- Message-id: <a363117b-a916-2563-bf46-aea3194758ea@univention.de>
- In-reply-to: <20170210210234.q6gmgmw6oitgoogq@thunk.org>
- References: <abe0986af2ab6be015d8b669cb7f1a3289241e76.1486656027.git.hahn@univention.de> <20170210210234.q6gmgmw6oitgoogq@thunk.org>
Hello Theodore,
Am 10.02.2017 um 22:02 schrieb Theodore Ts'o:
> On Thu, Feb 09, 2017 at 05:03:30PM +0100, Philipp Hahn wrote:
>> install-std: DH_OPTIONS=
>> -install-std: build
>> +install-std: build cleanup
>
> I don't think this works. The clean target *must* be done before the
> build target. In fact, it must be completed before the build target
> starts --- and the way the depedencies are specified above, dh_prep's
> deletion of the build directory would be racing with the build
> target's trying to populate them.
>
> No?
I think "No" ;-)
Notice the difference between "clean" and "clean*up*":
> $ sed -ne '/^clean/,/^$/p' debian/rules
> clean:
> dh_testdir
> rm -rf ${STAMPSDIR}
> [ ! -f ${stdbuilddir}/Makefile ] || $(MAKE) -C ${stdbuilddir} V=1 distclean
> [ ! -f ${bfbuilddir}/Makefile ] || $(MAKE) -C ${bfbuilddir} V=1 distclean
> [ ! -f ${staticbuilddir}/Makefile ] || $(MAKE) -C ${staticbuilddir} V=1 distclean
> rm -rf ${stdbuilddir} ${bfbuilddir} ${staticbuilddir} ${mipsbuilddir} ${mipsbuilddir64}
> rm -f debian/*.substvars
> dh_clean
>
> cleanup:
> dh_testdir
> dh_testroot
> dh_prep
When "dh_prep" is called, it only removed the files belonging to Debian
packages, e.g. the debhelper fragments, package specific directories,
substvars and tmp/. - all the things that must be removed before
"binary" builds the Debian packages:
> $ ls -1 debian > ../before
> $ dh_prep
> $ ls -1 debian > ../after
> $ diff ../before ../after |grep ^\<
> < comerr-dev
> < comerr-dev.substvars
> < e2fsck-static
> < e2fsck-static.substvars
> < e2fslibs
> < e2fslibs-dbg
> < e2fslibs-dbg.substvars
> < e2fslibs-dev
> < e2fslibs-dev.substvars
> < e2fslibs.postinst.debhelper
> < e2fslibs.postrm.debhelper
> < e2fslibs.substvars
> < e2fsprogs
> < e2fsprogs-dbg
> < e2fsprogs-dbg.substvars
> < e2fsprogs-udeb
> < e2fsprogs-udeb.substvars
> < e2fsprogs.substvars
> < libcomerr2
> < libcomerr2-dbg
> < libcomerr2-dbg.substvars
> < libcomerr2.postinst.debhelper
> < libcomerr2.postrm.debhelper
> < libcomerr2.substvars
> < libss2
> < libss2-dbg
> < libss2-dbg.substvars
> < libss2.postinst.debhelper
> < libss2.postrm.debhelper
> < libss2.substvars
> < ss-dev
> < ss-dev.substvars
> < tmp
So "cleanup" must be called fore "binary" or "binary-arch" or
"binary-indep".
FYI: First calling "make binary-arch" and then "make binary-indep" is
not equivalent to "make binary", as the state would be purged in between
then.
I've tested the build multiple times on a 4 CPU KVM: without the patch
most builds fail with the quoted error or with some other race-condition
error; since the patch every built (~6) went fine.
Philipp "pmhahn@debian.org" Hahn
--- End Message ---