sh_scripts/check_old_rel_pkgs/README.md

74 lines
2.1 KiB
Markdown

# check_old_rel_pkgs[_quick].sh
## Description
Small scripts to list ports/pkgs needs updating with base ABI change.<br>
Could be helpful after major release upgrade.
## Usage
No command line arguments.
Simply run it as a bourne shell script.
Quick version has less functionality but much faster.
Output is directed to stdout, so redirect to file if needed.
### Quick version
Output format is as follows.
Port `origin` : `arch`
Only ABI major version part of arch is checked if it mathes `CURVERS` below or not,
and unmatched ports is listed.
Not flavor aware.
### Normal version
Output format is space separated as follows.
`origin arch lock removed`
Where:
* origin is the ports/pkgs origin. If any, @flavor is shown.
* arch is architecture string on pkg database like
FreeBSD:14:amd64
where:
* FreeBSD as operating system
* 14 as major OS release
* amd64 as CPU architecture
* lock is the pkg lock status.
* FREE for not locked.
* LOCKED for locked.
* removed for existence on ports tree.
* EXISTS for not deleted.
* DELETED for ports having MOVED entry without any successor.
If CPU architecture is "*", it means the port/pkg is independent from CPU architecture like fonts, documents and/or scripts.
Why FREE and EXISTS is shown?<br>
It's for scripts to handle the output easier.
As the output is directed to stdout, you can connect to pipe for further processing, or to file to keep.
As `cut -w` handles multiple space characters as single, I decided to output verbosely.
## Configuring the script
### CURVERS
You need to specify current major release here.
13 for 13.*[-p*] or stable/13, 14 for 14.*[-p*] or stable/14.
For main branch, you should specify latest stable branch + 1.
When stable/14 is the latest, set it as 15.
### PORTSDIR
The directory where ports tree to be used exists.
Default is where vanilla FreeBSD expects: /usr/ports
This is not used for quick version.
## Sample output line
### Quick version
`Port editors/vim : FreeBSD:14:amd64`
### Normal version
`editors/vim@console FreeBSD:14:amd64 FREE EXISTS`