Comment 11 for bug 1834340

Verification of version/release upgrade path
with the version numbers used in the debdiff
for all packages/releases (to be attached).

$ for pkg in prayer mailsync asterisk
do

  echo "Package: $pkg"

  E_NEW="$(grep -h urgency ${pkg}_e*.debdiff | grep -o '(.*)' | tr -d '[()]' | sed -n 1p)"
  E_OLD="$(grep -h urgency ${pkg}_e*.debdiff | grep -o '(.*)' | tr -d '[()]' | sed -n 2p)"
  D_NEW="$(grep -h urgency ${pkg}_d*.debdiff | grep -o '(.*)' | tr -d '[()]' | sed -n 1p)"
  D_OLD="$(grep -h urgency ${pkg}_d*.debdiff | grep -o '(.*)' | tr -d '[()]' | sed -n 2p)"
  B_NEW="$(grep -h urgency ${pkg}_b*.debdiff | grep -o '(.*)' | tr -d '[()]' | sed -n 1p)"
  B_OLD="$(grep -h urgency ${pkg}_b*.debdiff | grep -o '(.*)' | tr -d '[()]' | sed -n 2p)"

  echo "Versions:"
  echo "B (old): $B_OLD"
  echo "B (new): $B_NEW"
  echo "D (old): $D_OLD"
  echo "D (new): $D_NEW"
  echo "E (old): $E_OLD"
  echo "E (new): $E_NEW"

  dpkg --compare-versions $E_NEW gt $E_OLD && \
  dpkg --compare-versions $E_NEW gt $D_NEW && \
  dpkg --compare-versions $D_NEW gt $D_OLD && \
  dpkg --compare-versions $D_NEW gt $B_NEW && \
  dpkg --compare-versions $B_NEW gt $B_OLD && \
  echo 'Version/release upgrade path is OK.' || \
  echo 'Version/release upgrade path is NOT ok.'

  echo
done

Package: prayer
Versions:
B (old): 1.3.5-dfsg1-4build1
B (new): 1.3.5-dfsg1-4build2
D (old): 1.3.5-dfsg1-6
D (new): 1.3.5-dfsg1-6build0.19.04.1
E (old): 1.3.5-dfsg1-6
E (new): 1.3.5-dfsg1-6build1
Version/release upgrade path is OK.

Package: mailsync
Versions:
B (old): 5.2.2-3.1build1
B (new): 5.2.2-3.1build1.18.04.1
D (old): 5.2.2-3.1build1
D (new): 5.2.2-3.1build1.19.04.1
E (old): 5.2.2-3.1build1
E (new): 5.2.2-3.1build2
Version/release upgrade path is OK.

Package: asterisk
Versions:
B (old): 1:13.18.3~dfsg-1ubuntu4
B (new): 1:13.18.3~dfsg-1ubuntu4build1
D (old): 1:16.2.1~dfsg-1
D (new): 1:16.2.1~dfsg-1build1
E (old): 1:16.2.1~dfsg-2
E (new): 1:16.2.1~dfsg-2build1
Version/release upgrade path is OK.