Add another script which has less functionality but much faster.

This commit is contained in:
Tomoaki AOKI [aka Junchoon] 2024-06-04 19:52:57 +09:00
parent e8a6657609
commit b55eeb85b6
2 changed files with 64 additions and 5 deletions

View file

@ -1,14 +1,26 @@
# check_old_rel_pkgs.sh # check_old_rel_pkgs[_quick].sh
## Description ## Description
A small script to list ports/pkgs needs updating with base ABI change.<br> Small scripts to list ports/pkgs needs updating with base ABI change.<br>
Would be helpful after major release upgrade. Could be helpful after major release upgrade.
## Usage ## Usage
No command line arguments. No command line arguments.
Simply run it as a bourne shell script. 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. 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. Output format is space separated as follows.
`origin arch lock removed` `origin arch lock removed`
@ -52,5 +64,11 @@ The directory where ports tree to be used exists.
Default is where vanilla FreeBSD expects: /usr/ports Default is where vanilla FreeBSD expects: /usr/ports
This is not used for quick version.
## Sample output line ## Sample output line
### Quick version
`Port editors/vim : FreeBSD:14:amd64`
### Normal version
`editors/vim@console FreeBSD:14:amd64 FREE EXISTS` `editors/vim@console FreeBSD:14:amd64 FREE EXISTS`

View file

@ -0,0 +1,41 @@
#!/bin/sh
#
# Copyright (c) 2024 Tomoaki AOKI
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# Configurations
CURVERS=14
# End configurations section.
pkg version -o | cut -f 1 -w | while read PACKAGE
do
ARCH=`pkg query %q ${PACKAGE}`
if [ ${CURVERS} != `echo ${ARCH} | cut -f 2 -d :` ]
then
echo Port ${PACKAGE} : ${ARCH}
fi
done