Skip to content

Commit

Permalink
UBUNTU: [Packaging] update helper scripts
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
  • Loading branch information
Seth Forshee committed Aug 10, 2020
1 parent f1c2bc8 commit a83b753
Showing 2 changed files with 22 additions and 8 deletions.
14 changes: 10 additions & 4 deletions debian/scripts/helpers/close
Original file line number Diff line number Diff line change
@@ -118,10 +118,16 @@ if [ -d "$DEBIAN/config" ]; then
fi
fi

# Derivatives and backports have a master kernel directory (DEBIAN_MASTER).
case "$DEBIAN" in
debian.master|debian.uc20-efi) skip_master_entries=1 ;;
esac
# For normal trees the fact that the update.conf file exists means that they are rebase
# kernels. There are some special trees which started with uc20-efi, which have that
# file because they logically depend on another source but do not have the directory
# which DEBIAN_MASTER points to.
# Skip inserting parent source entries if this is not a rebase tree.
if [ ! -f "$DEBIAN/etc/update.conf" ]; then
skip_master_entries=1
elif [ "$DEBIAN_MASTER" != "" -a ! -d "$DEBIAN_MASTER" ]; then
skip_master_entries=1
fi
if [ $skip_master_entries == 0 ]; then
if [ "$DEBIAN_MASTER" = "" ]; then
echo "DEBIAN_MASTER should be defined either in $DEBIAN/etc/update.conf or the environment"
16 changes: 12 additions & 4 deletions debian/scripts/helpers/rebase
Original file line number Diff line number Diff line change
@@ -56,12 +56,20 @@ while getopts "r:b:l:d" opt; do
done
shift $((OPTIND - 1))

case "$DEBIAN" in
debian.master|debian.uc20-efi)
# For normal trees the fact that the update.conf file exists means that they are rebase
# kernels. There are some special trees which started with uc20-efi, which have that
# file because they logically depend on another source but do not have the directory
# which DEBIAN_MASTER points to.
IS_REBASE_KERNEL=true
if [ ! -f "$DEBIAN/etc/update.conf" ]; then
IS_REBASE_KERNEL=false
elif [ "$DEBIAN_MASTER" != "" -a ! -d "$DEBIAN_MASTER" ]; then
IS_REBASE_KERNEL=false
fi
if ! $IS_REBASE_KERNEL; then
echo "This is not a rebase kernel, no rebase should be needed, please report if otherwise"
exit 0
;;
esac
fi

if [ "$DEBIAN_MASTER" = "" ]; then
echo "DEBIAN_MASTER should be defined either in ${DEBIAN}/etc/update.conf or the environment"

0 comments on commit a83b753

Please sign in to comment.