diff --git a/autodist-upstream-updates b/autodist-upstream-updates index 10294e1..f50d4b3 100755 --- a/autodist-upstream-updates +++ b/autodist-upstream-updates @@ -41,7 +41,8 @@ function usage() echo "openmamba-upstream-updates [-h|-m][-r repository][-o output_repository]" echo 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 " -r repository: specify the repository (default: devel)" echo " -o repository: specify the repository for output data (default: same as base repository)" @@ -132,8 +133,9 @@ while [ "$1" ]; do usage exit 1 else - missing_only=1 + missing_only=1 fi ;; + -u) needupdate_only=1 ;; -r) [ "$2" ] || { echo "Error: option -r requires repository name as parameter" usage @@ -290,38 +292,36 @@ while read pkg ver alias; do } fi fi - if [ "$pkgline" ]; then + if [ "$pkgline" -a ! "$missing_only" ]; then set -- $pkgline pkgname=$1 pkgver=$2 version_find_bigger $pkgver ${ver/-/.} vercmp=$? + [ "${vercmp}" != "2" -a "$needupdate_only" ] && continue [ "$found_manual" ] && pkgname=$3 - if [ ! "$missing_only" ]; then - [ "$found_alias" -o "$found_manual" ] && nameadd="$pkg" || unset nameadd - unset veradd - [ ${vercmp} = 2 ] && veradd="$ver" - [ ${vercmp} = 1 ] && veradd="$ver" -# [ "${ver/-/}" != "$pkgver" ] && veradd="$ver" || unset veradd - [ "$veradd" -o "$nameadd" ] && { - [ "$veradd" -a "$nameadd" ] && \ - verappend="($nameadd;$veradd)" || - verappend="(${nameadd}${veradd})" - } || unset verappend - if [ "$distromatic_html" = "1" ]; then - echo "${JOB_PKGS[0]} $pkgver $verappend
" - 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 - } + [ "$found_alias" -o "$found_manual" ] && nameadd="$pkg" || unset nameadd + unset veradd + [ ${vercmp} = 2 ] && veradd="$ver" + [ ${vercmp} = 1 ] && veradd="$ver" + [ "$veradd" -o "$nameadd" ] && { + [ "$veradd" -a "$nameadd" ] && \ + verappend="($nameadd;$veradd)" || + verappend="(${nameadd}${veradd})" + } || unset verappend + if [ "$distromatic_html" = "1" ]; then + echo "${JOB_PKGS[0]} $pkgver $verappend
" + else + echo "$pkg $pkgver ($ver)" 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 fi done < $UPDATES_DB diff --git a/etc/cron.daily/40-autodist-upstream-updates b/etc/cron.daily/40-autodist-upstream-updates index 34fc416..2aa4025 100755 --- a/etc/cron.daily/40-autodist-upstream-updates +++ b/etc/cron.daily/40-autodist-upstream-updates @@ -5,12 +5,12 @@ # . /etc/autodist/config 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 -/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 -/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 diff --git a/etc/cron.hourly/60-autodist-autobuild b/etc/cron.hourly/60-autodist-autobuild index 8e32d57..db052f0 100755 --- a/etc/cron.hourly/60-autodist-autobuild +++ b/etc/cron.hourly/60-autodist-autobuild @@ -38,7 +38,7 @@ pid_check distromatic -q -t $DISTROMATIC_REPOSITORY --gensrcpkglist > $LOCAL_REPS_BASE_DIR/$DISTROMATIC_REPOSITORY/srcpkglist 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 pid_check