pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/38272



The following reply was made to PR pkg/38272; it has been noted by GNATS.

From: Gavan Fantom <gavan%coolfactor.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/38272
Date: Mon, 24 Mar 2008 13:35:21 +0000

 Here is an implementation of the second idea which seems to do the job here.
 
 I think this is the right way to do this, although I'm open to 
 suggestions for improvement.
 
 Index: flavor/pkg/flavor-vars.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mk/flavor/pkg/flavor-vars.mk,v
 retrieving revision 1.7
 diff -u -u -r1.7 flavor-vars.mk
 --- flavor/pkg/flavor-vars.mk   10 Mar 2008 20:05:59 -0000      1.7
 +++ flavor/pkg/flavor-vars.mk   24 Mar 2008 13:32:11 -0000
 @@ -27,6 +27,12 @@
   _PKG_DBDIR=            ${_CROSS_DESTDIR}${DEPOTBASE}
   .endif
 
 +.if !exists(${PKG_TOOLS_BIN}/pkg_info)
 +. if defined(PKG_TOOLS_BIN_BOOTSTRAP)
 +PKG_TOOLS_BOOTSTRAP!=  ${PKGSRCDIR}/mk/scripts/bootstrap-tools 
 ${PKG_TOOLS_BIN}
   ${PKG_TOOLS_BIN_BOOTSTRAP}
 +. endif
 +.endif
 +
   PKG_ADD_CMD?=          ${PKG_TOOLS_BIN}/pkg_add
   PKG_ADMIN_CMD?=                ${PKG_TOOLS_BIN}/pkg_admin
   PKG_CREATE_CMD?=       ${PKG_TOOLS_BIN}/pkg_create
 Index: platform/NetBSD.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mk/platform/NetBSD.mk,v
 retrieving revision 1.29
 diff -u -u -r1.29 NetBSD.mk
 --- platform/NetBSD.mk  4 Mar 2008 06:45:34 -0000       1.29
 +++ platform/NetBSD.mk  24 Mar 2008 13:32:11 -0000
 @@ -31,11 +31,8 @@
   .endif
   MOTIF_TYPE_DEFAULT?=   openmotif       # default 2.0 compatible libs type
   NOLOGIN?=              /sbin/nologin
 -.if exists(${LOCALBASE}/sbin/pkg_info)
   PKG_TOOLS_BIN?=                ${LOCALBASE}/sbin
 -.else
 -PKG_TOOLS_BIN?=                /usr/sbin
 -.endif
 +PKG_TOOLS_BIN_BOOTSTRAP?= /usr/sbin
   ROOT_CMD?=             ${SU} - root -c
   ROOT_USER?=            root
   ROOT_GROUP?=   wheel
 Index: scripts/bootstrap-tools
 ===================================================================
 RCS file: scripts/bootstrap-tools
 diff -N scripts/bootstrap-tools
 --- /dev/null   1 Jan 1970 00:00:00 -0000
 +++ scripts/bootstrap-tools     24 Mar 2008 13:32:11 -0000
 @@ -0,0 +1,20 @@
 +#!/bin/sh
 +
 +TOOLSDIR=$1
 +BOOTSTRAP=$2
 +
 +if [ "X${TOOLSDIR}" = "X" -o "X${BOOTSTRAP}" = "X" ]
 +then
 +    echo "Usage: $0 toolsdir bootstrap"
 +    exit 1
 +fi
 +
 +mkdir -p ${TOOLSDIR}
 +
 +for tool in pkg_add pkg_admin pkg_create pkg_delete pkg_info pkg_view 
 linkfarm
 +do
 +    ln -s ${BOOTSTRAP}/${tool} ${TOOLSDIR}/${tool}
 +done
 +
 +# Make seems to like having some kind of output
 +echo "done"
 


Home | Main Index | Thread Index | Old Index