From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6818905211330887680 X-Received: by 2002:a2e:86c6:: with SMTP id n6mr3045312ljj.236.1587663163739; Thu, 23 Apr 2020 10:32:43 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:9ad6:: with SMTP id p22ls1870941ljj.9.gmail; Thu, 23 Apr 2020 10:32:43 -0700 (PDT) X-Google-Smtp-Source: APiQypLY+2bx2gi2TVXftSlH1MHEQREiguorlw0fQ+vAByBjc5YdorhByXQ0XVpNLzDALRaQFbyz X-Received: by 2002:a2e:7508:: with SMTP id q8mr2864307ljc.234.1587663163089; Thu, 23 Apr 2020 10:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587663163; cv=none; d=google.com; s=arc-20160816; b=zh/KALVlRa+uuwlpGg0q2vSCG7nujXJ6wEqXJg2iisWxkqnr3ykI5v6QsK+e87bHaV bDKq54CwFYaxbQv+EWlQR/CocRg9cVpHVOoOaDLACas90oODl6TMs4Pt0HEGAAMclsl/ 6HtUgNrSCY4++8dNiTIussPpSKl2xV2Bv/GNYr8xO3is5nQRhSo6Ofgxtz2YosJmNvpw X4H5z/pz8+pRj2VWZKXGHEQj+yMMcrbFTYxkGO5yL58/24YOqM5Kbd8Tdwee6EmyEJ7n /bI1ZQ6QcclBsI+LZE7n5+KcH8SoeE6JMG2rczMysXkfovzbkcsxLnlUhCe6oN0RP66j eLVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=B0PXdwzQuj3NlFHgbxEEOIgOJEN9yDAz39m5+2dEGAI=; b=oz2U3WEF76aoafSITolQnPI20gRK8rJ7sWoCBf3DFXwZOdZYqehXzYi8OeMK77e7EP SbuyXcoA3bti2/11P0DAsxLdXMZB5L22wdp75MEtEDeR/rPCZUkT1MVp4sI6yq9UfvG4 GYbL5FIjjzrfn31hLwLGQgrSDEHryAPbkGQ67ReY1A1HKx7wucgvWAj8M166IxLh7PrF m6NCXJCq6ga+hRXcAkiksOpBzvr4KUL8nkZAAJI6mpWUc5a+x+Bc1l6CEa00Q4E0vQVk MKfR6begCon0reavRNGUE2e9senoQd39hT/+6N78UaASRdo0sT1kySwLhqz+FGkG1DJm HrwQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id a21si279679lfr.4.2020.04.23.10.32.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2020 10:32:43 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id 03NHWg9X021043 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 23 Apr 2020 19:32:42 +0200 Received: from md1za8fc.ad001.siemens.net ([167.87.46.0]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 03NHWfV8027950; Thu, 23 Apr 2020 19:32:42 +0200 Date: Thu, 23 Apr 2020 19:32:40 +0200 From: Henning Schild To: Jan Kiszka Cc: isar-users Subject: Re: [PATCH v3] debianize: Add placeholder for original version to CHANGELOG_V Message-ID: <20200423193240.64dd1628@md1za8fc.ad001.siemens.net> In-Reply-To: <080b69c9-f654-f712-3f94-838ce77e9bdd@siemens.com> References: <20200423184332.5f714d15@md1za8fc.ad001.siemens.net> <080b69c9-f654-f712-3f94-838ce77e9bdd@siemens.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: CgtkLwBY/CsB On Thu, 23 Apr 2020 18:50:54 +0200 Jan Kiszka wrote: > On 23.04.20 18:43, Henning Schild wrote: > > On Thu, 23 Apr 2020 18:31:10 +0200 > > Jan Kiszka wrote: > > > >> From: Jan Kiszka > >> > >> This allows to append to the latest upstream version when using an > >> unpinned source version. The format of the placeholder is > >> "". > >> > >> Signed-off-by: Jan Kiszka > >> --- > >> > >> Changes in v3: > >> - fix regression when placeholder was not used > >> > >> meta/classes/debianize.bbclass | 13 +++++++++++-- > >> 1 file changed, 11 insertions(+), 2 deletions(-) > >> > >> diff --git a/meta/classes/debianize.bbclass > >> b/meta/classes/debianize.bbclass index da43a4e2..e77be232 100644 > >> --- a/meta/classes/debianize.bbclass > >> +++ b/meta/classes/debianize.bbclass > >> @@ -11,6 +11,15 @@ DESCRIPTION ?= "must not be empty" > >> MAINTAINER ?= "Unknown maintainer " > >> > >> deb_add_changelog() { > >> + changelog_v="${CHANGELOG_V}" > >> + if [ -f ${S}/debian/changelog ]; then > >> + if [ ! -f ${WORKDIR}/changelog.orig ]; then > >> + cp ${S}/debian/changelog > >> ${WORKDIR}/changelog.orig > >> + fi > >> + orig_version=$(dpkg-parsechangelog -l > >> ${WORKDIR}/changelog.orig -S Version) > >> + changelog_v=$(echo "${changelog_v}" | sed > >> 's//'${orig_version}'/') > >> + fi > >> + > >> timestamp=$(find ${S}/ -type f -not -path "${S}/debian/*" > >> -printf "%T@\n"|sort -n -r|head -n 1) if [ -n "${timestamp}" ]; > >> then date=$(LANG=C date -R -d @${timestamp}) > >> @@ -18,7 +27,7 @@ deb_add_changelog() { > >> date=$(LANG=C date -R) > >> fi > >> cat < ${S}/debian/changelog > >> -${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low > >> +${PN} (${changelog_v}) UNRELEASED; urgency=low > >> > >> * generated by Isar > >> > >> @@ -26,7 +35,7 @@ ${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low > >> EOF > >> if [ -f ${WORKDIR}/changelog ]; then > >> if head -1 "${WORKDIR}"/changelog | \ > >> - grep -q -e "^${PN} (${CHANGELOG_V})" > >> + grep -q -e "^${PN} (${changelog_v})" > > > > Might want to switch to dpkg-parsechangelog while at it. > > > > Should that still match both PN and the version? Would actually > become more complex, though conceptually cleaner. Good catch, i think the PN was just in there because i decided to "parse" myself. Prepending a changelog entry with another PN would be pretty broken. What i cared about here was "only" the case where someone already created an entry with that PV, maybe because they wanted a nicer "commit message", another author, prio, date ... If we wanted to double-check, other places would need to do that as well. I would drop it and wait for the first "fool" to change PN during a rebuild. Henning > Jan >