Re: Packaging a "bin" dir correctly?

From: Date: Tue, 16 Sep 2008 13:57:51 +0000
Subject: Re: Packaging a "bin" dir correctly?
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50767@lists.php.net to get a copy of this message
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.) -- Paul M. Jones http://paul-m-jones.com/

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