Re: Packaging a "bin" dir correctly?

From: Date: Tue, 16 Sep 2008 14:22:29 +0000
Subject: Re: Packaging a "bin" dir correctly?
References: 1 2 3 4 5 6 7  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50768@lists.php.net to get a copy of this message
On Tue, Sep 16, 2008 at 8:57 AM, Paul M Jones <pmjones88@gmail.com> wrote: > > On Sep 15, 2008, at 16:30 , Brett Bieber wrote: > >>> It still puts the scripts in "pear/bin/bin/solar" though. >>> >>>> Eh, I think that would be the 'installas' option... >>>> >>>> 'installas' => array('foo' => 'bar') >>>> will install foo as bar instead. >>> >>> Have tried that using 'installas' => array('bin/solar' => >>> 'Solar/solar') >>> and >>> no joy -- it appears to be ignored by the packaging mechanism. Am I >>> setting >>> it incorrectly? >> >> It works here for me - >> >> ucommbieber:core bbieber$ svn diff release >> Index: release >> =================================================================== >> --- release (revision 3394) >> +++ release (working copy) >> @@ -140,10 +140,11 @@ >> '*' => 'php', >> ), >> 'exceptions' => array( >> - 'bin/*' => 'script', >> - 'tests/*' => 'test', >> - 'docs/*' => 'doc', >> + 'bin/solar' => 'script', >> ), >> + 'installas' => array( >> + 'bin/solar' => 'Solar/solar', >> + ), >> ); >> >> Gives me: >> ucommbieber:core bbieber$ grep -A4 -B1 install-as trunk/package.xml >> <dir name="bin"> >> <file role="script" baseinstalldir="/" >> install-as="Solar/solar" >> name="solar"> >> <replace from="@package_version@" to="version" >> type="package-info"/> >> <replace from="@package_date@" to="date" >> type="package-info"/> >> </file> >> </dir> <!-- /bin --> > > > I applied the change you noted above. Interesting results! It shows in > package.xml as this: > > <dir name="/" baseinstalldir="/"> > <dir name="bin"> > <file role="script" install-as="Solar/solar" > name="solar"> > <replace from="@package_version@" to="version" > type="package-info"/> > <replace from="@package_date@" to="date" > type="package-info"/> > </file> > </dir> <!-- /bin --> > > But in package2.xml I have this: > > <dir name="bin"> > <file name="solar" role="script"> > <tasks:replace from="@package_version@" to="version" > type="package-info" > /> > <tasks:replace from="@package_date@" to="date" > type="package-info" /> > </file> > </dir> <!-- /bin --> > > No install-as in the v2 XML. Is that a bug? (Using > PEAR_PackageFileManager-1.6.3-stable, PEAR-1.7.2-stable.) Aha, totally missed something... I didn't realize you were writing a package v1 xml file, which contributed to my ignorance regarding the install-as attribute. install-as was the attribute in package xml v1, in package xml v2 the install-as structure is different. <phprelease> <filelist> <install as="pear" name="scripts/pear.sh" /> </filelist> </phprelease> only, your package2.xml file contains an empty element: <phprelease /> ... Still not sure why, or how to specify it correctly in pfm2. Could be a bug, but I'm not sure. -- Brett Bieber http://saltybeagle.com/

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