Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Oct 03, 2013
@williambr williambr Use ports subsystem to gather PBI depends
Using the ports INDEX-* file does not work when taking make.conf options
into account. Ports subsystem provides "all-depends-list" and
"package-depends" that can be used for this purpose.
e7b4478
@kmoore134 kmoore134 Merge pull request #4 from williambr/feature/portsdepends
Use ports subsystem to gather PBI depends
b5c7565
Showing with 8 additions and 18 deletions.
  1. +8 −18 src-sh/pbi-manager/pbi-manager
View
26 src-sh/pbi-manager/pbi-manager
@@ -4955,27 +4955,25 @@ start_pbi_prune_ports()
{
if [ "${PBI_PRUNEBUILDPORTS}" = "NO" ] ; then return ; fi
- local iFile="$PORTSDIR/INDEX-$FBSDMAJOR"
-
get_pkgname "${PORTSDIR}/${PBI_MAKEPORT}"
echo "${PKGNAME}" > /.keepports
- grep "^${PKGNAME}|" $iFile | cut -d '|' -f 9 | tr ' ' '\n' >>/.keepports
+ make -C "${PORTSDIR}/${PBI_MAKEPORT}" PORTSDIR=${PORTSDIR} package-depends | cut -d: -f1 >> /.keepports
# Do the same for any OTHERPORTS
for port in ${PBI_MKPORTBEFORE}
do
if [ ! -d "${PORTSDIR}/${port}" ] ; then continue ; fi
get_pkgname "${PORTSDIR}/${port}"
echo "${PKGNAME}" >> /.keepports
- grep "^${PKGNAME}|" $iFile | cut -d '|' -f 9 | tr ' ' '\n' >>/.keepports
+ make -C "${PORTSDIR}/${port}" PORTSDIR=${PORTSDIR} package-depends | cut -d: -f1 >> /.keepports
done
for port in ${PBI_MKPORTAFTER}
do
if [ ! -d "${PORTSDIR}/${port}" ] ; then continue ; fi
get_pkgname "${PORTSDIR}/${port}"
echo "${PKGNAME}" >> /.keepports
- grep "^${PKGNAME}|" $iFile | cut -d '|' -f 9 | tr ' ' '\n' >>/.keepports
+ make -C "${PORTSDIR}/${port}" PORTSDIR=${PORTSDIR} package-depends | cut -d: -f1 >> /.keepports
done
# Sort and clean the ports
@@ -7346,12 +7344,6 @@ do_port_build()
{
local _lPort="$1"
- local iFile="$PORTSDIR/INDEX-$FBSDMAJOR"
- if [ ! -e "$iFile" ] ; then
- echo "Creating $iFile "
- make -C ${PORTSDIR} index
- fi
-
echo "Checking port: $_lPort"
# Make sure this port isn't already loaded
@@ -7373,21 +7365,19 @@ do_port_build()
PBI_BUILD_GROUPS="$PBI_BUILD_GROUPS $pGroups"
fi
- # Parse the pkg deps
- for cPkg in `grep "^${pkgName}|" $iFile | cut -d '|' -f 8-9 | sed 's/|/ /g'`
+ # Parse the pkg deps
+ for _port in `make -C $_lPort PORTSDIR=${PORTSDIR} all-depends-list|sed 's,^${PORTSDIR}/,,g'`
do
- if [ -z "$cPkg" ] ; then continue ; fi
+ if [ -z "${_port}" ] ; then continue ; fi
# is this installed?
if [ $PKGNG -eq 1 ] ; then
- pkg info -e ${cPkg}
+ pkg info -e ${_port}
if [ $? -eq 0 ] ; then continue ; fi
else
- if [ -e "/var/db/pkg/${cPkg}" ] ; then continue ; fi
+ if [ -e "/var/db/pkg/`make -V PKGNAME -C ${_port} PORTSDIR=${PORTSDIR}`" ] ; then continue ; fi
fi
- local _port=`grep "^${cPkg}|" $iFile | cut -d '|' -f 2`
-
# Not installed, do this one now until we drill down to the base
do_port_build "${_port}" >&1 2>&1
done

No commit comments for this range

Something went wrong with that request. Please try again.