ports/110697: New port: ports-mgmt/pkg_deps

Andrew Turner andrew+ports at fubar.geek.nz
Fri Mar 23 08:00:09 UTC 2007


>Number:         110697
>Category:       ports
>Synopsis:       New port: ports-mgmt/pkg_deps
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 23 08:00:08 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Turner
>Release:        FreeBSD 5.5-RC1 i386
>Organization:
>Environment:
System: FreeBSD serv.int.fubar.geek.nz 5.5-RC1 FreeBSD 5.5-RC1 #0: Mon May 15 14:09:18 NZST 2006 root at serv.int.fubar.geek.nz:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	pkg_deps is a script to find what ports/packages will need to be installed before the given port can be installed.
	
>How-To-Repeat:
	
>Fix:

	

--- pkg_deps.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	Makefile
#	pkg-descr
#	files
#	files/pkg_deps.sh
#
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
X# New ports collection makefile for:	pkg_deps
X# Date created:		23 March 2007
X# Whom:			Andrew Turner <andrew+ports at fubar.geek.nz>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	pkg_deps
XPORTVERSION=	0.20070323
XCATEGORIES=	ports-mgmt
XDISTFILES=
X
XMAINTAINER=	andrew+ports at fubar.geek.nz
XCOMMENT=	Script for finding what uninstalled ports will be installed
X
XNO_BUILD=	yes
X
XPLIST_FILES=	sbin/pkg_deps
X
Xdo-install:
X	${INSTALL_SCRIPT} ${FILESDIR}/pkg_deps.sh ${PREFIX}/sbin/pkg_deps
X
X.include <bsd.port.mk>
END-of-Makefile
echo x - pkg-descr
sed 's/^X//' >pkg-descr << 'END-of-pkg-descr'
Xpkg_deps is a tool to find what ports will be installed when make install
Xis run from the current directory.
X
XWWW: http://fubar.geek.nz/blog/category/freebsd/pkg_deps/
END-of-pkg-descr
echo c - files
mkdir -p files > /dev/null 2>&1
echo x - files/pkg_deps.sh
sed 's/^X//' >files/pkg_deps.sh << 'END-of-files/pkg_deps.sh'
X#!/bin/sh
X# Copyright (C) 2007, Andrew Turner, All rights reserved.
X#
X# Redistribution and use in source and binary forms, with or without
X# modification, are permitted provided that the following conditions
X# are met:
X# 1. Redistributions of source code must retain the above copyright
X#    notice, this list of conditions and the following disclaimer
X#    in this position and unchanged.
X# 2. Redistributions in binary form must reproduce the above copyright
X#    notice, this list of conditions and the following disclaimer in the
X#    documentation and/or other materials provided with the distribution.
X# 3. The name(s) of the author(s) may not be used to endorse or promote
X#    products derived from this software without specific prior written
X#    permission.
X#
X# THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
X# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X# IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
X# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
X# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
X# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
X# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
X# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
X# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
X
Xif [ ! -f Makefile ]; then
X	echo "Run $0 in a port directory" > /dev/stderr
X	exit 1
Xfi
X
XPORTNAME=`make -V PKGNAME`
XPORTSDIR=`make -V PORTSDIR`
XREQUIRED=`make all-depends-list`
X
XTO_INSTALL=""
XPKG_COUNT=0
Xfor package in ${REQUIRED}
Xdo
X	origin=`echo ${package} | sed "s|${PORTSDIR}||" | sed "s|^/||"`
X	pkg_test=`pkg_info -qO ${origin}`
X	if [ ! -n "${pkg_test}" ]; then
X		TO_INSTALL="${TO_INSTALL} ${origin}"
X		PKG_COUNT=$((PKG_COUNT+1))
X	fi
Xdone
Xif [ ${PKG_COUNT} -eq 0 ]; then
X	echo "No other ports will be installed"
Xelse
X	echo "These ${PKG_COUNT} packages will be installed when installing ${PORTNAME}:"
X	echo ${TO_INSTALL}
Xfi
END-of-files/pkg_deps.sh
exit
--- pkg_deps.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list