~solene/openbsd-check-outdated

511ac3ec — Solène Rapenne 4 days ago
update aliases
8e3ba064 — Solène Rapenne 4 days ago
allow crawling categories
c564fa0a — Solène Rapenne 11 days ago
remove useless use of cat

clone

read-only
https://git.sr.ht/~solene/openbsd-check-outdated
read/write
git@git.sr.ht:~solene/openbsd-check-outdated

You can also use your local clone with git send-email.

#Presentation

On OpenBSD, check_outdated compares the version of installed packages with upstream, using repology.org database. It is meant to be used by people hacking on packages to know when a package they use (installed) has a newer version upstream that need to be packaged in ports.

It is only useful on OpenBSD -current.

asciicast

#Getting started

Display manually installed packages that could be updated

./check_outdated -a -m

If a status changed compared to an existing cached previous response, the line will be displayed in bold.

#Usage

  • -a hide all except outdated packages
  • -m only check manually installed packages (output from pkg_info -m)
  • -r display information from cache when available
  • -i hide ignored packages (ignored by repology)
  • -f hide incorrect packages (repology can not correlate to a package)
  • -n hide up to date packages
  • -o hide outdated packages
  • -l hide null packages (not mapped to a package in repology)
  • -u hide unique packages (only present in OpenBSD)
  • -d portsdir: select a ports tree directory, default /usr/ports
  • -q only display lines with status change (suitable for cron)
  • -h display this
  • pkgpath ...: restrict the check to the given list of pkgpath (eg. games/openttd)

#Scan multiple directories from ports

It is possible to run check_outdated on a ports category or the whole ports tree.

find /usr/ports/editors/ -type d -exec check_outdated -a {} +

#Scan current port

If your shell is currently in a ports directory, you can use check_outdated this way:

check_outdated $PWD

#Cache

A cache directory is created in ~/.cache/check_outdated_packages/ with a json file for each package that was checked.

When using -r, check_outdated will reuse the cached files when exist, even if they are old. By default, it reuse cache when newer than 20h because it is not useful to update more frequently than once a day.

#Requirements

  • A ports tree directory, default in /usr/ports/ but this can be overriden using -d.
  • jq package
  • curl package