Bug#150597: dpkg-dev: dpkg-genchanges should not bother with control file
Package: dpkg-dev
Version: 1.9.21
Severity: wishlist
If dpkg-genchanges finds discreprencies between the control file and the
files list file, it should use the latter for generating the Binary:
field, and not the former.
I have a modules package, which means that it generates a package named
poldhu-$(kvers}. I have that in my control file:
joey@satin:~/lib/kernel/modules/poldhu-0.2.12>grep Package: debian/control
Package: poldhu-${kvers}
I manage quite cleanly (rules file attached) to make dpkg-gencontrol
stubstitute in the kernel version for ${kvers} in the generated
DEBIAN/control file. Likewise it generates a correct debian/files:
joey@satin:~/lib/kernel/modules/poldhu-0.2.12>cat debian/files
poldhu-2.4.18_0.2.12-7_i386.deb admin extra
Unlike most kernel module packages, I am *not* running sed on the control file;
that is what dpkg-gencontrol is for. And it works fine. But.
The problem comes when dpkg-genchanges is run:
joey@satin:~/lib/kernel/modules/poldhu-0.2.12>dpkg-genchanges
dpkg-genchanges: warning: package poldhu-${kvers} in control file but not in files list
dpkg-genchanges: warning: package poldhu-${kvers} in control file but not in files list
dpkg-genchanges: warning: package poldhu-${kvers} in control file but not in files list
dpkg-genchanges: warning: package poldhu-${kvers} in control file but not in files list
dpkg-genchanges: warning: package poldhu-${kvers} in control file but not in files list
dpkg-genchanges: warning: package poldhu-2.4.18 listed in files list but not in control info
dpkg-genchanges: warning: package poldhu-2.4.18 listed in files list but not in control info
dpkg-genchanges: not including original source code in upload
Format: 1.7
Date: Thu, 20 Jun 2002 14:50:01 -0400
Source: poldhu
Binary: poldhu-${kvers}
Architecture: source
Version: 0.2.12-7
Distribution: unstable
Urgency: low
Maintainer: Joey Hess <joeyh@debian.org>
Changed-By: Joey Hess <joeyh@debian.org>
Changes:
poldhu (0.2.12-7) unstable; urgency=low
.
* Corrected building w/o pcmcia-cs available.
Files:
daf7ccb36bb27bd7f427f9083398ef76 580 admin extra poldhu_0.2.12-7.dsc
0be5dc65552859085b0b5fad08169b49 3281 admin extra poldhu_0.2.12-7.diff.gz
5e0ca563bba1962a6742db4e97bfd4b4 21128 admin extra poldhu-2.4.18_0.2.12-7_i386.deb
Notice the broken Binary: field. I'm sure this would never pass by incoming.
It seems to me that dpkg-genchanges knows what packages are in the files
list file, so why not just use that list of packages for the Binary: line?
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux satin 2.4.18 #1 Wed Jun 19 23:07:31 EDT 2002 i586
Locale: LANG=C, LC_CTYPE=C
Versions of packages dpkg-dev depends on:
ii binutils 2.12.90.0.9-1 The GNU assembler, linker and bina
ii cpio 2.4.2.91-2 GNU cpio -- a program to manage ar
ii make 3.79.1-14 The GNU version of the "make" util
ii patch 2.5.4-11 Apply a diff file to an original
ii perl [perl5] 5.6.1-7 Larry Wall's Practical Extraction
ii perl-modules 5.6.1-7 Core Perl modules.
#!/usr/bin/make -f
#
# This rules file is invoked in three different ways. Either I am building a
# source-only release of the package to upload to the debian archive, or
# the package is being built as a kernel module by make-kpkg, or apt-src.
ifdef APT_SRC_BUILD
# Get info from apt-src about where the kernel source is, and what version
# it is. These variables are otherwise set by make-kpkg.
KVERS=$(shell apt-src version 'kernel-source.*')
KSRC=$(shell apt-src location 'kernel-source.*')
endif
ifdef KVERS
# Make debhelper build the package by the right name. Also, make it use
# debian/postinst, etc as the files for the package it builds, instead of
# using debian/poldhu-$(KVERS).postinst.
PACKAGE=poldhu-$(KVERS)
export DH_OPTIONS=-p$(PACKAGE) --mainpackage=$(PACKAGE)
endif
# If the module is being built and the kernel is compiled to not use
# the in-kernel pcmcia drivers, the module needs to be built against the
# pcmcia-cs source tree. For now, if apt-src knows about it, use it..
PCMCIA_CS=$(shell apt-src location pcmcia-\(cs\|source\))
ifneq (,$(PCMCIA_CS))
export DEBIAN_CFLAGS=-D__IN_PCMCIA_PACKAGE__ -I$(PCMCIA_CS)/include
endif
# Work out where the deb file should go. For make-kpkg, it needs to go
# below the kernel source; otherwise it can do in the regular place.
ifdef KMAINT # set my make-kpkg
DEST=$(KSRC)/..
else
DEST=..
endif
build:
ifdef KVERS
dh_testdir
./Configure -n --kernel=$(KSRC) --target=`pwd`/debian/$(PACKAGE)
$(MAKE) all
endif
clean:
dh_testdir
dh_testroot
-$(MAKE) clean
dh_clean
binary-arch: build
ifdef KVERS
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs etc/pcmcia
$(MAKE) install
dh_installchangelogs
dh_installdocs README TODO
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_installdeb
dh_gencontrol -- -Vkvers=$(KVERS)
dh_md5sums
dh_builddeb --destdir=$(DEST)
else
# Have to stub in a debian/files here to keep dpkg-genchanges happy.
touch debian/files
endif
binary-indep:
binary: binary-indep binary-arch
# These targets are used by make-kpkg. Just stub in to the real targets.
kdist_config:
kdist_build: build
kdist_clean: clean
kdist_image: binary
.PHONY: build clean binary-indep binary-arch binary
.PHONY: kdist_config kdist_build kdist_clean kdist_image
--
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: