public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v3] debianize: Add placeholder for original version to CHANGELOG_V
Date: Fri, 24 Apr 2020 09:59:53 +0200	[thread overview]
Message-ID: <3beec9eb-783c-3588-86ec-1244f3b50f91@siemens.com> (raw)
In-Reply-To: <20200423193240.64dd1628@md1za8fc.ad001.siemens.net>

On 23.04.20 19:32, Henning Schild wrote:
> On Thu, 23 Apr 2020 18:50:54 +0200
> Jan Kiszka <jan.kiszka@siemens.com> wrote:
> 
>> On 23.04.20 18:43, Henning Schild wrote:
>>> On Thu, 23 Apr 2020 18:31:10 +0200
>>> Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>    
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> This allows to append to the latest upstream version when using an
>>>> unpinned source version. The format of the placeholder is
>>>> "<orig-version>".
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>> ---
>>>>
>>>> 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 <unknown@example.com>"
>>>>    
>>>>    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>/'${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 <<EOF > ${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.
> 

OK. I will write a cleanup patch for that aspect on top of this one.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2020-04-24  7:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 16:31 Jan Kiszka
2020-04-23 16:43 ` Henning Schild
2020-04-23 16:50   ` Jan Kiszka
2020-04-23 17:32     ` Henning Schild
2020-04-24  7:59       ` Jan Kiszka [this message]
2020-04-23 16:47 ` Henning Schild
2020-05-07 19:45 ` Baurzhan Ismagulov
2020-05-07 20:02   ` Henning Schild
2020-05-07 20:28     ` Baurzhan Ismagulov
2020-05-08  5:45       ` Henning Schild
2020-05-08  6:02         ` Baurzhan Ismagulov
2020-05-08  6:02     ` Jan Kiszka
2020-05-08  6:06       ` Baurzhan Ismagulov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3beec9eb-783c-3588-86ec-1244f3b50f91@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox