summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-23 11:01:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-23 11:01:30 +0000
commit6d49919d094b0480b8fe18244ec1e11033488c80 (patch)
tree288fa94c8de0e62d942832095b7dcf34fb578204
parentUpdating. (diff)
downloadprogress-linux-tools-6d49919d094b0480b8fe18244ec1e11033488c80.tar.xz
progress-linux-tools-6d49919d094b0480b8fe18244ec1e11033488c80.zip
Updating.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-xweb/hint-packages.sh33
1 files changed, 28 insertions, 5 deletions
diff --git a/web/hint-packages.sh b/web/hint-packages.sh
index ef76ebf..9a6fce6 100755
--- a/web/hint-packages.sh
+++ b/web/hint-packages.sh
@@ -7,8 +7,8 @@ for CODENAMES in \
engywuck-backports_fuchur-backports \
fuchur_engywuck \
fuchur-backports_engywuck-backports \
- graograman_fuchur
- #graograman-backports_fuchur-backports
+ graograman_fuchur \
+ graograman-backports_fuchur-backports
do
TARGET="$(echo ${CODENAMES} | awk -F_ '{ print $1 }')"
SOURCE="$(echo ${CODENAMES} | awk -F_ '{ print $2 }')"
@@ -17,13 +17,13 @@ do
echo "${TARGET} hints"
echo "###############################################################################"
- cd "/srv/git/progress-linux.org/packages/${SOURCE}"
+ PACKAGES="$(cd /srv/git/progress-linux.org/packages/${SOURCE} && ls -d */)"
- for PACKAGE in $(ls -d */)
+ for PACKAGE in ${PACKAGES}
do
PACKAGE="$(basename ${PACKAGE})"
- if [ ! -e "../${TARGET}/${PACKAGE}" ]
+ if [ ! -e "/srv/git/progress-linux.org/packages/${TARGET}/${PACKAGE}" ]
then
case "${TARGET}" in
engywuck)
@@ -74,6 +74,29 @@ do
;;
esac
+ case "${SOURCE}" in
+ *-backports)
+ # version check
+ DISTRIBUTION="${TARGET}"
+ PARENT_DISTRIBUTION="$(echo ${DISTRIBUTION} | awk -F- '{ print $1 }')"
+
+ if [ ! -e upstream.${DISTRIBUTION}.sources ] || [ ! -e upstream.${PARENT_DISTRIBUTION}.sources ]
+ then
+ echo "no indices.. running update first.."
+ ./update.${DISTRIBUTION}
+ fi
+
+ DISTRIBUTION_VERSION="$(sed -n "/^Package: ${PACKAGE}$/,/^Version:/p" upstream.${DISTRIBUTION}.sources | awk '/^Version: / { print $2 }' | sort -rV | head -n1)"
+ PARENT_VERSION="$(sed -n "/^Package: ${PACKAGE}$/,/^Version:/p" upstream.${PARENT_DISTRIBUTION}.sources | awk '/^Version: / { print $2 }' | sort -rV | head -n1)"
+
+ if [ -n "${PARENT_VERSION}" ] && dpkg --compare-versions ${PARENT_VERSION} ge ${DISTRIBUTION_VERSION}
+ then
+ # package has not been updated in "stable", hence no need for "backports"
+ continue
+ fi
+ ;;
+ esac
+
echo "${TARGET}: ${PACKAGE}"
fi
done