From patchwork Tue Apr 17 14:37:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herton Ronaldo Krzesinski X-Patchwork-Id: 153192 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 66536B7058 for ; Wed, 18 Apr 2012 00:37:56 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SK9XG-0005J7-Ec; Tue, 17 Apr 2012 14:37:38 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SK9XB-0005Ix-6i for kernel-team@lists.ubuntu.com; Tue, 17 Apr 2012 14:37:33 +0000 Received: from [189.115.83.138] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SK9XA-0004yP-H2; Tue, 17 Apr 2012 14:37:33 +0000 Date: Tue, 17 Apr 2012 11:37:28 -0300 From: Herton Ronaldo Krzesinski To: Tim Gardner Subject: Re: Allow passing version for dpkg-genchanges to dpkg-buildpackage for -meta Message-ID: <20120417143727.GA2648@herton-Z68MA-D2H-B3> References: <1334601027-8262-1-git-send-email-herton.krzesinski@canonical.com> <4F8CC93A.6000904@canonical.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4F8CC93A.6000904@canonical.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com On Mon, Apr 16, 2012 at 07:36:58PM -0600, Tim Gardner wrote: > On 04/16/2012 12:30 PM, Herton Ronaldo Krzesinski wrote: > >When doing stable updates, we sometimes have cases where we need to > >include more than one changelog entry on meta packages, for example, we > >do one release to -proposed, this doesn't end up in updates, another > >release/abi bump happens, and we must include 2 changelog entries for > >the packages that will go to updates. > > > >Following this is the proposed changes for hardy and the rest of meta > >packages (lucid and everything supported until precise/q). It changes > >the Makefile so one can easily specify the previous version so we can > >tune the changelog generation as needed. It's a simple change, one could > >always specify the -v manually, but since we already have a Makefile > >that does everything... why not. > > > > If you're going that far, then why not make it automagic. Use > rmadison to extract the current version in updates, e.g., > > rtg@m1710:~$ rmadison -s lucid-updates linux-meta > linux-meta | 2.6.32.40.47 | lucid-updates | source Ok how about this: If someone doesn't want or doesn't have rmadison installed or rmadison isn't working at the moment for some reason, we can still specify manually. Also use the meta package name instead of hardcoding it. > > rtg > -- > Tim Gardner tim.gardner@canonical.com > diff --git a/Makefile b/Makefile index 0d18f4a..fc0b59f 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,30 @@ LOG := meta-source/debian/changelog -META_VERSION := $(shell head -1 $(LOG)|sed 's/.*(\(.*\)).*/\1/') +META_NAME := $(shell head -n 1 $(LOG) | sed 's/\(.*\)[[:space:]]\+(.*).*/\1/') +META_VERSION := $(shell head -n 1 $(LOG) | sed 's/.*(\(.*\)).*/\1/') +META_SERIES := $(shell head -n 1 $(LOG) | sed 's/.*(.*)[[:space:]]\+\(.*\);.*/\1/' | sed 's/-.*//') +LAST_VERSION ?= $(shell rmadison -a source -s $(META_SERIES)-updates $(META_NAME) | cut -d '|' -f 2 | tr -d '[:blank:]') + +ifeq ($(LAST_VERSION),) +LAST_VERSION := $(shell rmadison -a source -s $(META_SERIES) $(META_NAME) | cut -d '|' -f 2 | tr -d '[:blank:]') +ifeq ($(LAST_VERSION),) +LAST_VERSION := $(META_VERSION) +endif +endif all: source source: clean - ln -s meta-source linux-meta-$(META_VERSION) - cd linux-meta-$(META_VERSION); \ - dpkg-buildpackage -S -sa -rfakeroot -I.git -I.gitignore -i'\.git.*' + ln -s meta-source $(META_NAME)-$(META_VERSION) + cd $(META_NAME)-$(META_VERSION); \ + dpkg-buildpackage -S -sa -rfakeroot -I.git -I.gitignore -i'\.git.*' -v$(LAST_VERSION) binary: clean - ln -s meta-source linux-meta-$(META_VERSION) - cd linux-meta-$(META_VERSION); \ + ln -s meta-source $(META_NAME)-$(META_VERSION) + cd $(META_NAME)-$(META_VERSION); \ debuild -b clean: cd meta-source && fakeroot debian/rules clean - rm -f linux-meta-$(META_VERSION) + rm -f $(META_NAME)-$(META_VERSION) rm -f *.dsc *.changes *.gz *.deb *.build *.upload diff --git a/meta-source/debian/changelog b/meta-source/debian/changelog index 7537177..a1306c2 100644 --- a/meta-source/debian/changelog +++ b/meta-source/debian/changelog @@ -1,4 +1,4 @@ -linux-meta (3.2.0.23.25) precise-proposed; urgency=low +linux-meta (3.2.0.23.25) precise; urgency=low * Bump ABI