Bug#482745: lvm2: FTBFS when converted to new source format 3.0 (quilt)

hertzog at debian.org hertzog at debian.org
Sat May 24 17:14:24 UTC 2008


Package: lvm2
Version: 2.02.35-1
Severity: minor
Usertags: 3.0-quilt-by-default

To prepare a possible switch to the new source package format "3.0
(quilt)" [1], I converted all source packages and rebuilt the packages
afterwards to see what breaks, and lvm2 does break. To reproduce the
problem you can do this:

$ apt-get source lvm2
$ sed -i -e '/^Source:/ aFormat: 3.0 (quilt)' lvm2-2.02.35/debian/control
$ dpkg-source -b lvm2-2.02.35
$ dpkg-source -x lvm2_2.02.35-1.dsc
$ cd lvm2-2.02.35 && debuild -us -uc

In this process, if the .diff.gz contains changes to upstream files,
dpkg-source will have created a corresponding patch in
debian/patches/debian-changes-2.02.35-1 and will have registered that
patch in a quilt series (debian/patches/series, it is created if needed).
All the patches listed in the "series" file are applied directly during
the extraction (dpkg-source -x). quilt itself is used if available (and
will thus lead to the creation of the .pc directory), otherwise
dpkg-source applies the patches by itself. For more information about the
new source package format see the manual page dpkg-source(1).

In the case of lvm2, the build system copies sources files over
to a temporary directory but it doesn't copy the ".pc" directory if it
exists and thus the call to "quilt push -a" will fail trying to reapply
patches (since they have already been applied by dpkg-source -x).

I would suggest to call quilt push -a only if 'quilt unapplied' returns
true in the main source directory. Something like this (in your
setup-deb/setup-udeb rules):
if QUILT_PATCHES=$(CURDIR)/debian/patches quilt --quiltrc /dev/null \
    unapplied >/dev/null 2>&1; then \
    cd $(DIR); QUILT_PATCHES=$(CURDIR)/debian/patches quilt --quiltrc \
    /dev/null push -a || test $$? = 2; \
fi

Cheers,

[1] http://lists.debian.org/debian-devel-announce/2008/04/msg00004.html
-- 
Raphael Hertzog






More information about the pkg-lvm-maintainers mailing list