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,19 +292,18 @@ 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"
|
||||||
# [ "${ver/-/}" != "$pkgver" ] && veradd="<font color=red>$ver</font>" || unset veradd
|
|
||||||
[ "$veradd" -o "$nameadd" ] && {
|
[ "$veradd" -o "$nameadd" ] && {
|
||||||
[ "$veradd" -a "$nameadd" ] && \
|
[ "$veradd" -a "$nameadd" ] && \
|
||||||
verappend="($nameadd;$veradd)" ||
|
verappend="($nameadd;$veradd)" ||
|
||||||
@ -320,8 +321,7 @@ while read pkg ver alias; do
|
|||||||
echo "$pkg +$ver 0" >> $BUILDLIST_FILE
|
echo "$pkg +$ver 0" >> $BUILDLIST_FILE
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
fi
|
elif [ ! "$pkgline" ]; then
|
||||||
else
|
|
||||||
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