Subject: Re: read-only pkgsrc
To: grant beattie <grant@NetBSD.org>
From: Charles M. Hannum <abuse@spamalicious.com>
List: tech-pkg
Date: 04/05/2004 16:14:53
--Boundary-00=_9XYcAhq5OvGTBB/
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Monday 05 April 2004 03:01 pm, grant beattie wrote:
> On Mon, Apr 05, 2004 at 10:17:20AM -0400, Jan Schaumann wrote:
> > I think Grant mentioned this before:  at the moment, pkgsrc can't be
> > read-only because even with WRKOBJDIR set, it will create symlinks for
> > the workdir.
>
> it should work as long as WRKOBJDIR is set to a writable directory.
>
> WRKDIR_BASENAME is the name of the work directory that is created (or
> the symlink to it if WRKOBJDIR is set and if pkgsrc is writable).

Uh, I think a more important point is that the symlinks are completely 
useless.  I've had a private changes in my tree to remove them for years.

--Boundary-00=_9XYcAhq5OvGTBB/
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="no-symlinks.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="no-symlinks.diff"

Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1424
diff -u -r1.1424 bsd.pkg.mk
--- bsd.pkg.mk	17 Mar 2004 16:36:28 -0000	1.1424
+++ bsd.pkg.mk	5 Apr 2004 16:15:08 -0000
@@ -2017,18 +2017,6 @@
 .  endif
 .endif
 	${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${WRKDIR}
-.ifdef WRKOBJDIR
-.  if ${PKGSRC_LOCKTYPE} == "sleep" || ${PKGSRC_LOCKTYPE} == "once"
-.    if !exists(${LOCKFILE})
-	${_PKG_SILENT}${_PKG_DEBUG}					\
-	${RM} -f ${WRKDIR_BASENAME} || ${TRUE}
-.    endif
-.  endif
-	${_PKG_SILENT}${_PKG_DEBUG}					\
-	if ${LN} -s ${WRKDIR} ${WRKDIR_BASENAME} 2>/dev/null; then	\
-		${ECHO} "${WRKDIR_BASENAME} -> ${WRKDIR}";		\
-	fi
-.endif # WRKOBJDIR
 
 _EXTRACT_SUFFIXES=	.tar.gz .tgz .tar.bz2 .tbz .tar.Z .tar _tar.gz
 _EXTRACT_SUFFIXES+=	.shar.gz .shar.bz2 .shar.Z .shar
@@ -3712,8 +3700,7 @@
 	fi
 .  ifdef WRKOBJDIR
 	-${_PKG_SILENT}${_PKG_DEBUG}					\
-	${RMDIR} ${BUILD_DIR} 2>/dev/null;				\
-	${RM} -f ${WRKDIR_BASENAME}
+	${RMDIR} ${BUILD_DIR} 2>/dev/null
 .  endif
 .endif
 

--Boundary-00=_9XYcAhq5OvGTBB/--