1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

- Update to 2.0.2

PR:		125773
Submitted by:	maintainer
This commit is contained in:
Martin Wilke 2008-07-19 18:23:52 +00:00
parent 54e565eedc
commit 5e191d2f8d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=217133
3 changed files with 381 additions and 325 deletions

View File

@ -1,6 +1,6 @@
# New ports collection makefile for: bpkg
# Date created: 24 June 2007
# Whom: Andy Kosela <andy.kosela@gmail.com>
# Whom: Andy Kosela <akosela@andykosela.com>
#
# $FreeBSD$
#
@ -8,8 +8,7 @@
#
PORTNAME= bpkg
PORTVERSION= 2.0.1
PORTREVISION= 1
PORTVERSION= 2.0.2
CATEGORIES= ports-mgmt
MASTER_SITES= # none
DISTFILES= # none

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 2007 Andy Kosela <andy.kosela@gmail.com>
.\" Copyright (c) 2007-2008 Andy Kosela <akosela@andykosela.com>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.\"
.Dd July 4, 2008
.Dd July 19, 2008
.Dt BPKG 8
.Os
.Sh NAME
@ -45,7 +45,7 @@ installed ports and the whole ports tree.
The following command line arguments are supported:
.Bl -tag -width F1
.It Fl b
create backup package in /var/tmp/ from a locally installed port.
create backup package in /var/tmp/bpkg/ from a locally installed port.
.It Fl c
clean all distfiles in /usr/ports/distfiles/* [no arguments]
.It Fl C
@ -127,7 +127,7 @@ Display 10 most recently installed ports.
.Pp
.Dl Ar "> bpkg -b 'foo bar'"
.Pp
Create backup packages of foo and bar in /var/tmp/ directory.
Create backup packages of foo and bar in /var/tmp/bpkg/ directory.
.Sh SEE ALSO
.Xr pkg_add 1 ,
.Xr pkg_create 1 ,

View File

@ -1,7 +1,7 @@
#!/bin/sh
# $FreeBSD$
# Copyright (c) 2007 Andy Kosela <andy.kosela@gmail.com>
# Copyright (c) 2007-2008 Andy Kosela <akosela@andykosela.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -55,14 +55,16 @@ pkg_info-xI() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
if [ -z "$info" ]; then
path=`cd /usr/ports && make search path=/$e | grep -w Path | cut -d/ -f4,5`
echo -e "\033[33m*** not installed ***\033[0m"
for i in $path; do
echo "$i: `cat /usr/ports/$i/Makefile | grep COMMENT | cut -d= -f2`"
done
path=`cd /usr/ports && make search path=/$e | \
grep -w Path | cut -d/ -f4,5`
echo -e "\033[33m*** not installed ***\033[0m"
for i in $path; do
echo "$i: `cat /usr/ports/$i/Makefile | \
grep COMMENT | cut -d= -f2`"
done
else
echo -e "\033[33m*** installed ***\033[0m"
pkg_info -I $info
echo -e "\033[33m*** installed ***\033[0m"
pkg_info -I $info
fi
done
exit 0
@ -73,14 +75,16 @@ pkg_info-xL() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ ! -z "$info" ]; then
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -L `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -L `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`
done
else
echo "bpkg: no installed ports match $e"
echo "bpkg: no installed ports match $e"
fi
done
exit 0
@ -98,14 +102,16 @@ pkg_info-xs() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ ! -z "$info" ]; then
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -s `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -s `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`
done
else
echo "bpkg: no installed ports match $e"
echo "bpkg: no installed ports match $e"
fi
done
exit 0
@ -116,27 +122,31 @@ pkg_info-xr() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ -z "$info" ]; then
path=`cd /usr/ports && make search path=/$e.* | grep -w Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | grep -w COMMENT | cut -d= -f2`"
echo ""
echo "Information in ports for `echo $i | cut -d/ -f2`:"
echo ""
cd /usr/ports && make search path=/$i$ | grep .*-deps
echo ""
done
path=`cd /usr/ports && make search path=/$e.* | \
grep -w Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | \
grep -w COMMENT | cut -d= -f2`"
echo ""
echo "Information in ports for `echo $i | cut -d/ -f2`:"
echo ""
cd /usr/ports && make search path=/$i$ | grep .*-deps
echo ""
done
else
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo "Information in ports for $i:"
echo ""
cd /usr/ports && make search path=/$i$ | grep .*-deps
echo ""
pkg_info -rR `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo "Information in ports for $i:"
echo ""
cd /usr/ports && make search path=/$i$ | grep .*-deps
echo ""
pkg_info -rR `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`
done
fi
done
exit 0
@ -147,14 +157,16 @@ pkg_info-xg() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ ! -z "$info" ]; then
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -g `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -g `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`
done
else
echo "bpkg: no installed ports match $e"
echo "bpkg: no installed ports match $e"
fi
done
exit 0
@ -165,22 +177,26 @@ pkg_info-xf() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ -z "$info" ]; then
path=`cd /usr/ports && make search path=/$e.* | grep -w Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | grep -w COMMENT | cut -d= -f2`"
echo ""
echo "Packing list:"
cat /usr/ports/$i/pkg-plist
echo ""
done
path=`cd /usr/ports && make search path=/$e.* | \
grep -w Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | \
grep -w COMMENT | cut -d= -f2`"
echo ""
echo "Packing list:"
cat /usr/ports/$i/pkg-plist
echo ""
done
else
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -f `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -f `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`
done
fi
done
exit 0
@ -191,14 +207,16 @@ pkg_info-xk() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ ! -z "$info" ]; then
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -k `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -k `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`
done
else
echo "bpkg: no installed ports match $e"
echo "bpkg: no installed ports match $e"
fi
done
exit 0
@ -209,14 +227,16 @@ pkg_info-xD() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ ! -z "$info" ]; then
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -D `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info -D `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`
done
else
echo "bpkg: no installed ports match $e"
echo "bpkg: no installed ports match $e"
fi
done
exit 0
@ -227,22 +247,26 @@ pkg_info-x() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ -z "$info" ]; then
path=`cd /usr/ports && make search path=/$e.* | grep -w Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | grep -w COMMENT | cut -d= -f2`"
echo ""
echo "Description:"
echo "`cat /usr/ports/$i/pkg-descr`"
echo ""
done
path=`cd /usr/ports && make search path=/$e.* | \
grep -w Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | \
grep -w COMMENT | cut -d= -f2`"
echo ""
echo "Description:"
echo "`cat /usr/ports/$i/pkg-descr`"
echo ""
done
else
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
pkg_info `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`
done
fi
done
exit 0
@ -258,7 +282,8 @@ pkg_ver() {
pkg_path() {
path=`cd /usr/ports && make search path=/$pkg | grep -w Path | cut -d/ -f4,5`
for e in $path; do
echo "$e" ; cat /usr/ports/$e/Makefile | grep -w COMMENT | cut -d= -f2
echo "$e" ; cat /usr/ports/$e/Makefile | grep -w COMMENT | \
cut -d= -f2
done
exit 0
}
@ -274,20 +299,21 @@ pkg_makefile() {
make_search() {
for e in $pkg; do
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ -z "$info" ]; then
path=`cd /usr/ports && make search path=/$e | grep -w Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
cd /usr/ports && make search path=/$i$
done
path=`cd /usr/ports && make search path=/$e | \
grep -w Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
cd /usr/ports && make search path=/$i$
done
else
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
cd /usr/ports && make search path=/$i$
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
cd /usr/ports && make search path=/$i$
done
fi
done
exit 0
@ -343,15 +369,15 @@ pkg_clean() {
pkg_clean2() {
root
echo "Cleaning /usr/ports/distfiles/* and /usr/ports/*/*/work/"
rm -rf /usr/ports/distfiles/* 1>/dev/null 2>&1 ; rm -rf /usr/ports/*/*/work/ 1>/dev/null 2>&1
rm -rf /usr/ports/distfiles/* 1>/dev/null 2>&1
rm -rf /usr/ports/*/*/work/ 1>/dev/null 2>&1
echo "Done."
exit 0
}
pkg_which-() {
grep "$pkg"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | awk -F: '{ print $1 ":\t" $2 }'
exit 0
}
@ -364,18 +390,20 @@ pkg_backup() {
exit 0
fi
pkg_install=`pkg_info -xoQ $pkg | cut -d: -f1 | awk '{ORS=" " ; print}'`
echo "Creating backup package(s) "$pkg_install"in /var/tmp/"
pkg_install=`pkg_info -xoQ ^$pkg | cut -d: -f1 | awk '{ORS=" " ;print}'`
echo "Creating backup package(s) "$pkg_install"in /var/tmp/bpkg/"
[ ! -d /var/tmp/bpkg/ ] && mkdir /var/tmp/bpkg/
for e in $pkg; do
i=`pkg_info -xoQ $e | cut -d: -f1'`
cd /var/tmp/ && pkg_create -xb $i 1>/dev/null 2>&1
i=`pkg_info -xoQ ^$e | cut -d: -f1'`
cd /var/tmp/bpkg/ && pkg_create -xb $i 1>/dev/null 2>&1
done
echo "Done."
exit 0
}
pkg_time() {
/bin/ls -lUTt /var/db/pkg/ | awk -F' ' '{ print $6,$7,$8,$9,$10 }' | cut -d/ -f1,5
/bin/ls -lUTt /var/db/pkg/ | awk -F' ' '{ print $6,$7,$8,$9,$10 }' | \
cut -d/ -f1,5
echo "***`pkg_info | wc -l` ports installed ***"
exit 0
}
@ -383,34 +411,38 @@ pkg_time() {
make_showc() {
for e in $pkg; do
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ -z "$info" ]; then
path=`cd /usr/ports && make search path=/$e.* | grep Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | grep COMMENT | cut -d= -f2`"
echo ""
echo -n "Do you want to display config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make showconfig-recursive;;
*) cd /usr/ports/$i && make showconfig;;
esac
echo ""
done
path=`cd /usr/ports && make search path=/$e.* | \
grep Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | \
grep COMMENT | cut -d= -f2`"
echo ""
echo -n \
"Do you want to display config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make showconfig-recursive;;
*) cd /usr/ports/$i && make showconfig;;
esac
echo ""
done
else
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo -n "Do you want to display config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make showconfig-recursive;;
*) cd /usr/ports/$i && make showconfig;;
esac
echo ""
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo -n \
"Do you want to display config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make showconfig-recursive;;
*) cd /usr/ports/$i && make showconfig;;
esac
echo ""
done
fi
done
exit 0
@ -422,32 +454,37 @@ make_rmc() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ -z "$info" ]; then
path=`cd /usr/ports && make search path=/$e.* | grep Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | grep COMMENT | cut -d= -f2`"
echo ""
echo -n "Do you want to remove config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make rmconfig-recursive;;
*) cd /usr/ports/$i && make rmconfig;;
esac
echo ""
done
path=`cd /usr/ports && make search path=/$e.* | \
grep Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | \
grep COMMENT | cut -d= -f2`"
echo ""
echo -n \
"Do you want to remove config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make rmconfig-recursive;;
*) cd /usr/ports/$i && make rmconfig;;
esac
echo ""
done
else
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo -n "Do you want to remove config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make rmconfig-recursive;;
*) cd /usr/ports/$i && make rmconfig;;
esac
echo ""
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo -n \
"Do you want to remove config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make rmconfig-recursive;;
*) cd /usr/ports/$i && make rmconfig;;
esac
echo ""
done
fi
done
exit 0
@ -457,34 +494,38 @@ make_config() {
root
for e in $pkg; do
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ -z "$info" ]; then
path=`cd /usr/ports && make search path=/$e.* | grep Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | grep COMMENT | cut -d= -f2`"
echo ""
echo -n "Do you want to set config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make config-recursive;;
*) cd /usr/ports/$i && make config;;
esac
echo ""
done
path=`cd /usr/ports && make search path=/$e.* | \
grep Path | cut -d/ -f4,5`
for i in $path; do
echo -e "\033[33m*** not installed ***\033[0m"
echo "$i: `cat /usr/ports/$i/Makefile | \
grep COMMENT | cut -d= -f2`"
echo ""
echo -n \
"Do you want to set config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make config-recursive;;
*) cd /usr/ports/$i && make config;;
esac
echo ""
done
else
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo -n "Do you want to set config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make config-recursive;;
*) cd /usr/ports/$i && make config;;
esac
echo ""
done
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo -n \
"Do you want to set config options recursively? [n] "
read key
case $key in
y) cd /usr/ports/$i && make config-recursive;;
*) cd /usr/ports/$i && make config;;
esac
echo ""
done
fi
done
exit 0
@ -495,21 +536,23 @@ make_ldd() {
info=`grep $e /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d: -f3`
if [ -z "$info" ]; then
echo "bpkg: no installed ports match $e"
echo "bpkg: no installed ports match $e"
else
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo "List of dynamic object dependencies:"
echo ""
pkg=`grep $i /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
bin=`pkg_info -L $pkg | awk '/\/usr\/local\/bin/ /\/usr\/local\/sbin/ /usr\/local\/libexec/'`
for o in $bin; do
/usr/bin/ldd -a $o
done
echo ""
for i in $info; do
echo -e "\033[33m*** installed ***\033[0m"
echo "$i: `grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`"
echo ""
echo "List of dynamic object dependencies:"
pkg=`grep $i /var/db/pkg/*/+CONTENTS | \
grep -w ORIGIN | cut -d/ -f5`
bin=`pkg_info -L $pkg | awk '/\/usr\/local\/bin/ \
/\/usr\/local\/sbin/ /usr\/local\/libexec/'`
for o in $bin; do
/usr/bin/ldd -a $o
done
echo ""
done
fi
done
exit 0
@ -518,186 +561,200 @@ make_ldd() {
make_ldd_all() {
echo ""
echo "List of all missing dynamic object dependencies:"
echo ""
for e in `/bin/ls -l /bin/ 2>/dev/null | awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /bin/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /sbin/ 2>/dev/null | awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /sbin/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /usr/bin/ 2>/dev/null | awk -F' ' '{print $9}'`; do
for e in `/bin/ls -l /usr/bin/ 2>/dev/null | awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/bin/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /usr/games/ 2>/dev/null | awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/games/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /usr/libexec/ 2>/dev/null | awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/libexec/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /usr/sbin/ 2>/dev/null | awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/sbin/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /usr/local/bin/ 2>/dev/null | awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/local/bin/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /usr/local/libexec/ 2>/dev/null | awk -F' ' '{print $9}'`; do
for e in `/bin/ls -l /usr/local/libexec/ 2>/dev/null | \
awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/local/libexec/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /usr/local/sbin/ 2>/dev/null | awk -F' ' '{print $9}'`; do
for e in `/bin/ls -l /usr/local/sbin/ 2>/dev/null | \
awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/local/sbin/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
fi
done
for e in `/bin/ls -l /usr/X11R6/bin/ 2>/dev/null | awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/X11R6/bin/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /usr/X11R6/libexec/ 2>/dev/null | awk -F' ' '{print $9}'`; do
for e in `/bin/ls -l /usr/X11R6/libexec/ 2>/dev/null | \
awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/X11R6/libexec/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
for e in `/bin/ls -l /usr/X11R6/sbin/ 2>/dev/null | awk -F' ' '{print $9}'`; do
for e in `/bin/ls -l /usr/X11R6/sbin/ 2>/dev/null | \
awk -F' ' '{print $9}'`; do
libs=`/usr/bin/ldd -a /usr/X11R6/sbin/$e 2>/dev/null | grep found`
if [ ! -z "$libs" ]; then
grep "$e"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
grep "$e"$ /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $1 ":\t" $2 }'
echo "$libs"
for i in `echo $libs | cut -d' ' -f1 | cut -d. -f1,2`; do
grep "$i". /var/db/pkg/*/+CONTENTS | \
awk -F 'pkg/' '{ print $2 }' | sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
awk -F: '{ print $2 "\t [" $1 "]" }'
done
echo ""
done
echo ""
fi
done
exit 0