List Info

Thread: package.xml v2.0 questions




package.xml v2.0 questions
user name
2006-11-16 18:30:02
The package.xml example given at 
<http://pear.php.net/manual/en/guide.developers.pa
ckage2.php> uses the 
following for its file tag:

    <file name="Dependency2.php"
role="php">
     <tasks:replace from="PEAR-VER"
to="version" type="package-info"/>
    </file>

In contrast, PEAR 1.4.11 <http://pear.php.
net/package/PEAR> uses this:

   <file
md5sum="b309a1eb31b2826cd1cec229fb352eb0"
name="OS/Guess.php" 
role="php">
    <tasks:replace from="package_version"
to="version" 
type="package-info" />
   </file>

Which one is correct?  Is the md5sum attribute needed or
not?

Also, the first example seems to specify subdirs via nested
dir tags - 
not by having their path in the name attribute as the second
one does.  
eg.  The first one would seem to suggest that this is the
way to do it:

  <dir name="/">
    <dir name="OS">
      <file name="Guess.php" ...>
      ...
      </file>
    </dir>
  </dir>

...whereas the latter would seem to suggest this:

  <dir name="/">
    <file name="OS/Guess.php" ...>
    ...
    </file>
  </dir>

Also, I note that PEAR includes both v1 and v2 of
package.xml (albeit 
with different names).  Any ideas as to why?

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

package.xml v2.0 questions
user name
2006-11-16 20:08:12
Terra Frost wrote:
> The package.xml example given at
> <http://pear.php.net/manual/en/guide.developers.pa
ckage2.php> uses the
> following for its file tag:
> 
>    <file name="Dependency2.php"
role="php">
>     <tasks:replace from="PEAR-VER"
to="version" type="package-info"/>
>    </file>
> 
> In contrast, PEAR 1.4.11 <http://pear.php.
net/package/PEAR> uses this:
> 
>   <file
md5sum="b309a1eb31b2826cd1cec229fb352eb0"
name="OS/Guess.php"
> role="php">
>    <tasks:replace from="package_version"
to="version"
> type="package-info" />
>   </file>
> 
> Which one is correct?  Is the md5sum attribute needed
or not?

Both are correct.  The md5sum is automatically generated and
added when
you run "pear package" - take a look at
http://cvs.
php.net/pear-core/package2.xml, and you'll see that the
OS/Guess.php file is in fact:

<dir name="OS">
 <file name="Guess.php">
  <tasks:replace from="package_version"
to="version"
type="package-info" />
 </file>
</dir>

It is transformed to the one above on packaging.

> Also, the first example seems to specify subdirs via
nested dir tags -
> not by having their path in the name attribute as the
second one does. 
> eg.  The first one would seem to suggest that this is
the way to do it:
> 
>  <dir name="/">
>    <dir name="OS">
>      <file name="Guess.php" ...>
>      ...
>      </file>
>    </dir>
>  </dir>
> 
> ...whereas the latter would seem to suggest this:
> 
>  <dir name="/">
>    <file name="OS/Guess.php" ...>
>    ...
>    </file>
>  </dir>

Again, both are acceptable.  PEAR is very flexible about how
the file
list is arranged.

> Also, I note that PEAR includes both v1 and v2 of
package.xml (albeit
> with different names).  Any ideas as to why?

PEAR version 1.3.5 and older doesn't know anything about
package.xml v2,
 and if we didn't include package.xml v1, it would be
impossible to
upgrade from 1.3.x to the latest version.  At this point,
PEAR is the
only package that still needs to have this option, as PEAR
1.4.0+
adoption rate is greater than 99%

Greg

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )