Commit f2f4ae37 authored by Sultan Alsawaf's avatar Sultan Alsawaf

UBUNTU: [Packaging] update helper scripts

BugLink: http://bugs.launchpad.net/bugs/1786013Signed-off-by: default avatarSultan Alsawaf <sultan.alsawaf@canonical.com>
parent eb0abd7a
...@@ -3,7 +3,7 @@ export LC_ALL=C.UTF-8 ...@@ -3,7 +3,7 @@ export LC_ALL=C.UTF-8
usage() { usage() {
cat << EOF cat << EOF
Usage: ${P:-$(basename "$0")} [-h|--help] [-d|--dry-run] [-c|--include-config] [-s|--skip-master] Usage: ${P:-$(basename "$0")} [-h|--help] [-d|--dry-run] [-c|--include-config] [-s|--skip-master] [-b BASE_VERSION]
Prepare the closing release commit. Include all the changelog entries Prepare the closing release commit. Include all the changelog entries
in the current release, including the changes from the base in the current release, including the changes from the base
...@@ -15,6 +15,10 @@ Optional arguments: ...@@ -15,6 +15,10 @@ Optional arguments:
-c, --include-config Include config changes in the closing commit. -c, --include-config Include config changes in the closing commit.
-s, --skip-master Skip master kernel changelog entries (used when -s, --skip-master Skip master kernel changelog entries (used when
bootstraping new kernels). bootstraping new kernels).
-b BASE_VERSION For derivatives and backports, force the changelog
entries to have the base version as provided (used
when changing the base derivative version of a
backport).
-h, --help Show this help message and exit. -h, --help Show this help message and exit.
Examples: Examples:
...@@ -30,6 +34,7 @@ EOF ...@@ -30,6 +34,7 @@ EOF
dry_run=0 dry_run=0
commit_configs=0 commit_configs=0
skip_master_entries=0 skip_master_entries=0
base_version=
while [ "$#" -gt 0 ]; do while [ "$#" -gt 0 ]; do
case "$1" in case "$1" in
-h|--help) -h|--help)
...@@ -45,6 +50,10 @@ while [ "$#" -gt 0 ]; do ...@@ -45,6 +50,10 @@ while [ "$#" -gt 0 ]; do
-s|--skip-master) -s|--skip-master)
skip_master_entries=1 skip_master_entries=1
;; ;;
-b)
shift
base_version="$1"
;;
*) *)
usage usage
exit 1 exit 1
...@@ -109,7 +118,9 @@ if [ "$branch" != 'master' ]; then ...@@ -109,7 +118,9 @@ if [ "$branch" != 'master' ]; then
# skip that step and fetch the entries directly from the master kernel. # skip that step and fetch the entries directly from the master kernel.
version=$(dpkg-parsechangelog -l"$DEBIAN/changelog" -SVersion) version=$(dpkg-parsechangelog -l"$DEBIAN/changelog" -SVersion)
if [[ $version == *~* ]]; then if [[ $version == *~* ]]; then
base_version=$(dpkg-parsechangelog -l"$DEBIAN/changelog" -SVersion -c1 -o1) if [ -z "${base_version}" ]; then
base_version=$(dpkg-parsechangelog -l"$DEBIAN/changelog" -SVersion -c1 -o1)
fi
base_changelog="${DEBIAN%-*}/changelog" base_changelog="${DEBIAN%-*}/changelog"
if [ -f "$base_changelog" ] && [ "$DEBIAN" != "${DEBIAN%-*}" ]; then if [ -f "$base_changelog" ] && [ "$DEBIAN" != "${DEBIAN%-*}" ]; then
run ./debian/scripts/misc/insert-ubuntu-changes "$DEBIAN/changelog" "${base_version%%~*}" "${version%%~*}" "$base_changelog" run ./debian/scripts/misc/insert-ubuntu-changes "$DEBIAN/changelog" "${base_version%%~*}" "${version%%~*}" "$base_changelog"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment