[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP library policies...



Chad,

On Fri, 23 Mar 2001, Chad C. Walstrom wrote:

> > Well unlike with perl and python, most of the php extensions that are widely
> > used are included in PHP -- so they all have the same maintainer.  There may
> > not be a policy, or at least not a published one; and even if there is,
> > probably not many people know about it. :)

> > As with all packages, /usr/lib is used for architecture-specific files (e.g.,
> > binary php extensions) and /usr/share is for architecture-independent files
> > (e.g., PHP class files).  You might want to look at the directory structure
> > for some of the other PHP modules (e.g., php4-mysql, php4-pear) to see what
> > directories they use.

> THANK YOU!  Constructive advice!!  Always welcome. ;-)  Let me clear
> up an assumption about PHP then that you seem to be making.  There are
> no incompatibilities between PHP scripts written with PHP3 as opposed
> to PHP4?  Aren't there _some_ incompatibilities between the two,
> advancements and extensions in PHP4 that weren't in 3?

There are certainly incompatibilities between PHP3 and PHP4 scripts, and
subdirectories under /usr/lib and /usr/share should be versioned for this
reason, yes.  There are most definitely incompatibilities between PHP3 and
PHP4 extensions as well, but then, there are incompatibilities between
extensions built for any two releases of PHP4.  Looking in php4-ldap, I see
that the directory used for binary extensions is the default per upstream --
/usr/lib/php4/extensions/no-debug-non-zts-20001214.

I also see, looking at php4-pear, that the .php class files are all stored to
/usr/lib/php4/ -- which is again in keeping with the upstream if memory
serves, but not exactly correct according to Policy.  Hmm. :)

> Granted, we can handle dependencies at the package level, but should
> we use a versioning directory structure similar to that used for Perl
> and Python?

Are you looking at packaging a standalone PHP extension, or class files
written in PHP?  If the former, concerns with versioned directories are
already taken care of for you; if the latter, and if the class files aren't
explicitly bound to php4 and up (like PEAR is), you may be in uncharted
waters.

Steve Langasek
postmodern programmer



Reply to: