From: Henning Schild <henning.schild@siemens.com>
To: isar-users@googlegroups.com
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
"Dalamagkidis,
Konstantinos" <konstantinos.dalamagkidis@siemens.com>,
chombourger@gmail.com,
Henning Schild <henning.schild@siemens.com>
Subject: [PATCHv2 1/4] debianize: only prepend changelog when our entry is not there
Date: Thu, 7 Nov 2019 20:13:15 +0100 [thread overview]
Message-ID: <20191107191318.11348-2-henning.schild@siemens.com> (raw)
In-Reply-To: <20191107191318.11348-1-henning.schild@siemens.com>
From: Henning Schild <henning.schild@siemens.com>
The default release and urgency might not fit everyone, make sure we do
not prepend if that very release is already in the changelog. That
allows anyone to choose what they want and prevent prepending.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
meta/classes/debianize.bbclass | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index c231b41..33ab4f7 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -21,7 +21,15 @@ ${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low
-- ${MAINTAINER} ${date}
EOF
if [ -f ${WORKDIR}/changelog ]; then
- echo >> ${S}/debian/changelog
+ if head -1 "${WORKDIR}"/changelog | \
+ grep -q -e "^${PN} (${CHANGELOG_V})"
+ then
+ # entry for our version already there, use unmodified
+ rm ${S}/debian/changelog
+ else
+ # prepend our entry to an existing changelog
+ echo >> ${S}/debian/changelog
+ fi
cat ${WORKDIR}/changelog >> ${S}/debian/changelog
fi
}
--
2.23.0
next prev parent reply other threads:[~2019-11-07 19:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 19:13 [PATCHv2 0/4] document debianize.bbclass Henning Schild
2019-11-07 19:13 ` Henning Schild [this message]
2019-11-07 19:13 ` [PATCHv2 2/4] debianize: move variable defaults to the class that needs them Henning Schild
2019-11-07 19:13 ` [PATCHv2 3/4] doc: write something about "debianize" and add example package Henning Schild
2019-11-08 17:09 ` Jan Kiszka
2019-11-07 19:13 ` [PATCHv2 4/4] CI: add "samefile" to our example config and CI build Henning Schild
2019-11-25 8:02 ` [PATCHv2 0/4] document debianize.bbclass Jan Kiszka
2019-11-25 9:18 ` Henning Schild
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=20191107191318.11348-2-henning.schild@siemens.com \
--to=henning.schild@siemens.com \
--cc=chombourger@gmail.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=konstantinos.dalamagkidis@siemens.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