public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>,
	Henning Schild <henning.schild@siemens.com>
Subject: Re: [PATCH v2] debianize: Add placeholder for original version to CHANGELOG_V
Date: Thu, 23 Apr 2020 17:39:45 +0200	[thread overview]
Message-ID: <8c33278f-87f1-3d3f-fe0c-96d2c2af0b2d@siemens.com> (raw)
In-Reply-To: <bc812dfa-ca89-c398-8a6f-2720e291d0bf@siemens.com>

On 23.04.20 17:25, [ext] Jan Kiszka 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 v2:
>   - save and use original changelog for version placeholder
>   - use -S on dpkg-parsechangelog
> 
>   meta/classes/debianize.bbclass | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
> index da43a4e2..eb64ebb9 100644
> --- a/meta/classes/debianize.bbclass
> +++ b/meta/classes/debianize.bbclass
> @@ -11,6 +11,14 @@ DESCRIPTION ?= "must not be empty"
>   MAINTAINER ?= "Unknown maintainer <unknown@example.com>"
>   
>   deb_add_changelog() {
> +	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 +26,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 +34,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})"
>   		then
>   			# entry for our version already there, use unmodified
>   			rm ${S}/debian/changelog
> 

This is broken, v3 will follow - after it passed basic CI.

Jan

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

      reply	other threads:[~2020-04-23 15:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 15:25 Jan Kiszka
2020-04-23 15:39 ` Jan Kiszka [this message]

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=8c33278f-87f1-3d3f-fe0c-96d2c2af0b2d@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