[PATCH 1/1] UBUNTU: [Packaging] autoreconstruct -- base tag is always primary mainline version

Seth Forshee seth.forshee at canonical.com
Tue Feb 12 01:44:49 UTC 2019


On Thu, Feb 07, 2019 at 10:30:07AM +0000, Andy Whitcroft wrote:
> The base tag for autoreconstruct comparisons is always the primary mainline
> version.  Since the switch to 3.x that has been the first two version
> number elements (VERSION and PATCHLEVEL).  We already ignore the SUBLEVEL
> but inexplicibly take the EXTRAVERSION into account.  This is plain wrong
> as the orig.tar.gz will, for example, be of v3.13 for the trusty kernel.
> The tag therefore is v$(VERSION).$(PATCHLEVEL).
> 
> Drop the errant lookup and insertion of EXTRAVERSION into the
> upstream_tag specifier.

I just discovered why we were using EXTRAVERSION. That's where the -rcN
part of the version is placed, so before final release we need that to
construct a valid tag. I'm not sure if EXTRAVERSION is ever used for
anything else; it's not in any of the handful of trees I just looked at.

In one sense you're right that using EXTRAVERSION is misguided, since we
have no upstream tarball at the -rc stage. But on the other hand it
doesn't do any harm and makes the scripting work without special cases
for -rc kernels. Otherwise we could do something like this instead:

diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index ee8010ba7fa0..477f81f6fe21 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -116,7 +116,11 @@ insertchanges: autoreconstruct finalchecks
 	@perl -w -f $(DROOT)/scripts/misc/insert-changes.pl $(DROOT) $(DEBIAN) 
 
 autoreconstruct:
-	$(DROOT)/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct $(DROOT)/source/options
+	if grep -q "^EXTRAVERSION = -rc[0-9]\+$$" Makefile; then \
+		rm -f $(DEBIAN)/reconstruct; \
+	else \
+		$(DROOT)/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct $(DROOT)/source/options; \
+	fi
 
 finalchecks:
 	$(DROOT)/scripts/misc/final-checks "$(DEBIAN)" "$(prev_fullver)"




More information about the kernel-team mailing list