2001-04-19 12:47:34 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2001-10-05 21:09:08 -04:00
|
|
|
# $OpenBSD: check-plist,v 1.3 2001/10/06 01:09:08 naddy Exp $
|
2001-04-19 12:47:34 -04:00
|
|
|
# Copyright (c) 2001
|
|
|
|
# Marc Espie. 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 code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# 2. Neither the name of OpenBSD nor the names of its contributors
|
|
|
|
# may be used to endorse or promote products derived from this software
|
|
|
|
# without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY ITS AUTHOR AND THE OpenBSD project ``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 REGENTS 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.
|
|
|
|
|
|
|
|
# starting from an initial list, check package dependencies, and build
|
|
|
|
# derived updated lists.
|
|
|
|
# list.depends: all package dependencies
|
|
|
|
# list.dirs: corresponding extended directories
|
|
|
|
# list.pkgs: corresponding package names
|
|
|
|
|
|
|
|
if [ $# -ne 1 ]; then
|
|
|
|
echo "This script takes exactly one parameter"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
initial=$1
|
|
|
|
case "$initial" in
|
|
|
|
"/*");;
|
|
|
|
*)initial=`pwd`"/$initial";;
|
|
|
|
esac
|
|
|
|
depends="$initial.depends"
|
|
|
|
list="$initial.dirs"
|
|
|
|
packages="$initial.pkgs"
|
|
|
|
trimmed="$initial.trimmed"
|
|
|
|
|
|
|
|
: ${PORTSDIR:=/usr/ports}
|
|
|
|
cd ${PORTSDIR}
|
|
|
|
|
2001-04-22 12:16:42 -04:00
|
|
|
make ECHO_MSG='echo >&2' SUBDIRLIST=$initial show=FULLPKGPATH >$trimmed
|
|
|
|
make ECHO_MSG='echo >&2' SUBDIRLIST=$trimmed package-dir-depends >$depends
|
2001-04-19 12:47:34 -04:00
|
|
|
tsort -h $trimmed -r $depends >$list
|
2001-10-05 21:09:08 -04:00
|
|
|
make ECHO_MSG='echo >&2' show='FULLPKGNAME${SUBPACKAGE}' SUBDIRLIST=$list|sed -e 's,$,.tgz,' >$packages
|
2001-04-19 12:47:34 -04:00
|
|
|
echo "Packages with distribution problems:"
|
|
|
|
echo "------------------------------------"
|
|
|
|
make ECHO_MSG='echo -n' show=PERMIT_PACKAGE_CDROM SUBDIRLIST=$list|\
|
|
|
|
grep -v -i 'Yes$'
|