Re: Directory structure problem

From: Date: Fri, 17 Aug 2001 07:39:15 +0000
Subject: Re: Directory structure problem
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1585@lists.php.net to get a copy of this message
[Mika Tuupola <tuupola@appelsiini.net>] > While writing the GSM_SMS stuff for PEAR and looking at the > package.xml file it occurred me that in some cases there will > be some problems. > > If in CVS I had directory structure like this: > > GSM_SMS/ > SMS.php > Bearer.php > Bearer/ > kannel.php > otherdriver.php > ... > > > and in package.xml I have something like this: > > <FileList> > <Dir Name="GSM"> > <File Role="php">SMS.php</File> > <Dir Name="SMS"> > <File Role="php">Bearer.php</File> > <Dir Name="Bearer"> > <File Role="php">kannel.php</File> > <File Role="php">otherdriver.php</File> > </Dir> > </Dir> > </Dir> > </FileList> > > meaning after running the pear installer on GSM_SMS package > the directory structure will be: > > GSM/ > SMS.php > SMS/ > Bearer.php > Bearer/ > kannel.php > otherdriver.php > ... > > this will break the requires and includes which are something > like: > > require_once('GSM_SMS/Bearer/kannel.php'); > > I can find a couple of solutions for this. a) have the stuff > in cvs in GSM/SMS/ directory. b) install the stuff in GSM_SMS/ > c) change the requires when running the pear installer > > What should I do? Don't use GSM_SMS in the includes inside your package, use relative paths within the install tree. If you have scripts you need to run from within the CVS tree (normally that should only be .phpt test files), use relative includes there too, with whatever layout you have in CVS. Hope this helps, - Stig -- Stig Sæther Bakken <ssb@alltheweb.com> Fast Search & Transfer ASA, Trondheim, Norway

« previous php.pear.dev (#1585) next »