autodist-upstream-updates: added -u option to only output packages that are not up-to-date
This commit is contained in:
parent
0168057f06
commit
4b8773011b
@ -41,7 +41,8 @@ function usage()
|
|||||||
echo "openmamba-upstream-updates [-h|-m][-r repository][-o output_repository]"
|
echo "openmamba-upstream-updates [-h|-m][-r repository][-o output_repository]"
|
||||||
echo
|
echo
|
||||||
echo " -h: generate distromatic HTML output"
|
echo " -h: generate distromatic HTML output"
|
||||||
echo " -m: show missing packages only"
|
echo " -m: report missing packages only"
|
||||||
|
echo " -u: output not up-to-date packages only"
|
||||||
echo " -q: produces quite output"
|
echo " -q: produces quite output"
|
||||||
echo " -r repository: specify the repository (default: devel)"
|
echo " -r repository: specify the repository (default: devel)"
|
||||||
echo " -o repository: specify the repository for output data (default: same as base repository)"
|
echo " -o repository: specify the repository for output data (default: same as base repository)"
|
||||||
@ -134,6 +135,7 @@ while [ "$1" ]; do
|
|||||||
else
|
else
|
||||||
missing_only=1
|
missing_only=1
|
||||||
fi ;;
|
fi ;;
|
||||||
|
-u) needupdate_only=1 ;;
|
||||||
-r) [ "$2" ] || {
|
-r) [ "$2" ] || {
|
||||||
echo "Error: option -r requires repository name as parameter"
|
echo "Error: option -r requires repository name as parameter"
|
||||||
usage
|
usage
|
||||||
@ -290,38 +292,36 @@ while read pkg ver alias; do
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$pkgline" ]; then
|
if [ "$pkgline" -a ! "$missing_only" ]; then
|
||||||
set -- $pkgline
|
set -- $pkgline
|
||||||
pkgname=$1
|
pkgname=$1
|
||||||
pkgver=$2
|
pkgver=$2
|
||||||
version_find_bigger $pkgver ${ver/-/.}
|
version_find_bigger $pkgver ${ver/-/.}
|
||||||
vercmp=$?
|
vercmp=$?
|
||||||
|
[ "${vercmp}" != "2" -a "$needupdate_only" ] && continue
|
||||||
[ "$found_manual" ] && pkgname=$3
|
[ "$found_manual" ] && pkgname=$3
|
||||||
if [ ! "$missing_only" ]; then
|
[ "$found_alias" -o "$found_manual" ] && nameadd="$pkg" || unset nameadd
|
||||||
[ "$found_alias" -o "$found_manual" ] && nameadd="$pkg" || unset nameadd
|
unset veradd
|
||||||
unset veradd
|
[ ${vercmp} = 2 ] && veradd="<font color=red>$ver</font>"
|
||||||
[ ${vercmp} = 2 ] && veradd="<font color=red>$ver</font>"
|
[ ${vercmp} = 1 ] && veradd="$ver"
|
||||||
[ ${vercmp} = 1 ] && veradd="$ver"
|
[ "$veradd" -o "$nameadd" ] && {
|
||||||
# [ "${ver/-/}" != "$pkgver" ] && veradd="<font color=red>$ver</font>" || unset veradd
|
[ "$veradd" -a "$nameadd" ] && \
|
||||||
[ "$veradd" -o "$nameadd" ] && {
|
verappend="($nameadd;$veradd)" ||
|
||||||
[ "$veradd" -a "$nameadd" ] && \
|
verappend="(${nameadd}${veradd})"
|
||||||
verappend="($nameadd;$veradd)" ||
|
} || unset verappend
|
||||||
verappend="(${nameadd}${veradd})"
|
if [ "$distromatic_html" = "1" ]; then
|
||||||
} || unset verappend
|
echo "<a href=\"${DISTROMATIC_PREFIX}tag=${DISTROMATIC_REPOSITORY}&pkg=${JOB_PKGS[0]}.source\">${JOB_PKGS[0]} $pkgver</a> $verappend<br>"
|
||||||
if [ "$distromatic_html" = "1" ]; then
|
else
|
||||||
echo "<a href=\"${DISTROMATIC_PREFIX}tag=${DISTROMATIC_REPOSITORY}&pkg=${JOB_PKGS[0]}.source\">${JOB_PKGS[0]} $pkgver</a> $verappend<br>"
|
echo "$pkg $pkgver ($ver)"
|
||||||
else
|
|
||||||
echo "$pkg $pkgver ($ver)"
|
|
||||||
fi
|
|
||||||
[ $vercmp = 2 ] && {
|
|
||||||
if [ "$found_alias" ]; then
|
|
||||||
echo "$alias +$ver 0" >> $BUILDLIST_FILE
|
|
||||||
else
|
|
||||||
echo "$pkg +$ver 0" >> $BUILDLIST_FILE
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
else
|
[ $vercmp = 2 ] && {
|
||||||
|
if [ "$found_alias" ]; then
|
||||||
|
echo "$alias +$ver 0" >> $BUILDLIST_FILE
|
||||||
|
else
|
||||||
|
echo "$pkg +$ver 0" >> $BUILDLIST_FILE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
elif [ ! "$pkgline" ]; then
|
||||||
echo "$pkg ($ver)" >> $UPDATES_DB.missing
|
echo "$pkg ($ver)" >> $UPDATES_DB.missing
|
||||||
fi
|
fi
|
||||||
done < $UPDATES_DB
|
done < $UPDATES_DB
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
#
|
#
|
||||||
. /etc/autodist/config
|
. /etc/autodist/config
|
||||||
REPOSITORY=devel
|
REPOSITORY=devel
|
||||||
/usr/sbin/autodist-upstream-updates -h -r $REPOSITORY > $LOCAL_REPS_BASE_DIR/distromatic/$REPOSITORY/_popular.html
|
/usr/sbin/autodist-upstream-updates -h -u -r $REPOSITORY > $LOCAL_REPS_BASE_DIR/distromatic/$REPOSITORY/_popular.html
|
||||||
|
|
||||||
REPOSITORY=milestone1-1.1
|
REPOSITORY=milestone1-1.1
|
||||||
/usr/sbin/autodist-upstream-updates -h -r $REPOSITORY > $LOCAL_REPS_BASE_DIR/distromatic/$REPOSITORY/_popular.html
|
/usr/sbin/autodist-upstream-updates -h -u -r $REPOSITORY > $LOCAL_REPS_BASE_DIR/distromatic/$REPOSITORY/_popular.html
|
||||||
|
|
||||||
REPOSITORY=milestone2
|
REPOSITORY=milestone2
|
||||||
/usr/sbin/autodist-upstream-updates -h -r $REPOSITORY > $LOCAL_REPS_BASE_DIR/distromatic/$REPOSITORY/_popular.html
|
/usr/sbin/autodist-upstream-updates -h -u -r $REPOSITORY > $LOCAL_REPS_BASE_DIR/distromatic/$REPOSITORY/_popular.html
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -38,7 +38,7 @@ pid_check
|
|||||||
distromatic -q -t $DISTROMATIC_REPOSITORY --gensrcpkglist > $LOCAL_REPS_BASE_DIR/$DISTROMATIC_REPOSITORY/srcpkglist
|
distromatic -q -t $DISTROMATIC_REPOSITORY --gensrcpkglist > $LOCAL_REPS_BASE_DIR/$DISTROMATIC_REPOSITORY/srcpkglist
|
||||||
|
|
||||||
pid_check
|
pid_check
|
||||||
autodist-upstream-updates -q -h -r $DISTROMATIC_REPOSITORY -o $AUTODIST_REPOSITORY \
|
autodist-upstream-updates -q -h -m -r $DISTROMATIC_REPOSITORY -o $AUTODIST_REPOSITORY \
|
||||||
> $LOCAL_REPS_BASE_DIR/distromatic/$AUTODIST_REPOSITORY/_popular.html
|
> $LOCAL_REPS_BASE_DIR/distromatic/$AUTODIST_REPOSITORY/_popular.html
|
||||||
|
|
||||||
pid_check
|
pid_check
|
||||||
|
Loading…
Reference in New Issue
Block a user