Message ID | 20220819133549.899160-1-juerg.haefliger@canonical.com |
---|---|
State | New |
Headers | show |
Series | [Unstable,K] UBUNTU: [Packaging] Make stamp-install-<flavor> target reentrant | expand |
On Fri, Aug 19, 2022 at 03:35:49PM +0200, Juerg Haefliger wrote: > During development or for debugging purposes it's sometimes desirable to > run 'debian/rules build-<flavor>' multiple times in a row without starting > from scratch, i.e. without cleaning the build first. Currently this fails > because make tries to move a subdirectory to an already existing location > when installing files for the modules extra package: > > mv: cannot move '/build/debian/linux-modules-5.15.0-1016-oracle/lib/modules/5.15.0-1016-oracle/kernel' to '/build/debian/linux-modules-extra-5.15.0-1016-oracle/lib/modules/5.15.0-1016-oracle/kernel/kernel': Directory not empty > make: *** [debian/rules.d/2-binary-arch.mk:155: /build/debian/stamps/stamp-install-oracle] Error 1 > > Fix that by properly running dh_prep at the beginning of the install > target. > > Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com> Makes sense to me, applied both to kinetic/linux and kinetic/linux-unstable. Thanks, -Andrea
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 87b1e4037c62..5f26d117cc8d 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -134,6 +134,9 @@ $(stampdir)/stamp-install-%: $(stampdir)/stamp-build-% $(stampdir)/stamp-install ifneq ($(skipdbg),true) dh_prep -p$(bin_pkg_name)-$*-dbgsym endif +ifeq ($(do_extras_package),true) + dh_prep -p$(mods_extra_pkg_name)-$* +endif # The main image # compress_file logic required because not all architectures
During development or for debugging purposes it's sometimes desirable to run 'debian/rules build-<flavor>' multiple times in a row without starting from scratch, i.e. without cleaning the build first. Currently this fails because make tries to move a subdirectory to an already existing location when installing files for the modules extra package: mv: cannot move '/build/debian/linux-modules-5.15.0-1016-oracle/lib/modules/5.15.0-1016-oracle/kernel' to '/build/debian/linux-modules-extra-5.15.0-1016-oracle/lib/modules/5.15.0-1016-oracle/kernel/kernel': Directory not empty make: *** [debian/rules.d/2-binary-arch.mk:155: /build/debian/stamps/stamp-install-oracle] Error 1 Fix that by properly running dh_prep at the beginning of the install target. Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com> --- debian/rules.d/2-binary-arch.mk | 3 +++ 1 file changed, 3 insertions(+)