Brian Utterback wrote:


Shawn Walker wrote:
Brian Utterback wrote:
Shawn Walker wrote:

If those modules install under /usr/lib/*, yes. If you can have CPAN install and deliver those modules under /usr/local/perl5 ... or perhaps /opt/perl5/locl or some other directory that doesn't belong to an existing package, then you should be ok.


Isn't the whole purpose of the site_perl directory to act as a place to install locally created perl modules? Is there another directory that

If it is, you'll find a few packages that incorrectly deliver to site_perl by default, such as:

pkg:/sunwimag...@6.3.4.2-0.126

The package system doesn't yet have a concept of package delivered directories that aren't managed by the package. If a package delivers a specific directory, then it expects the package manifest to dictate what the contents of that directory can be. This allows it to deal with fun things like directories moving to a different location or becoming a symlink, hardlink, etc.

perl will look in by default that isn't delivered via an IPS pkg?

$ perl -le "$,=', '; print @INC"

...will show you the default search path. From the looks of it, all of the directories that the default configuration (determined at compile time) looks in are delivered via the package.

You can also control this through various environment variables and other methods of course.

Cheers,


So, it looks like a bit of a disconnect. I looked around and it is definitely the case that site_perl is expected to be used by modules installed by the local admin in the same way /usr/local mimics /usr. Apparently CPAN builds modules to go there by default for just this reason.

Which sort of goes against what 'man filesystem' says (not that it is 100% correct these days anyway). It seems like our default configuration (at compile time) should cause CPAN to deliver things to /usr/local/perl5/site_perl by default instead. But that's my 5-second interpretation.

...

It would seem that either site_perl should be a symlink to /usr/local/perl5.../site_perl, or /usr/local/perl5.../site_perl needs to be added to the default search list in Perl, or pkg needs to be taught that a package owned by a directory might contain things not installed by a package. Or CPAN needs to be taught to make IPS packages. Or maybe all of the above. And those IPS packages that already deliver to site_perl should be fixed to deliver to vendor_perl.

I think all of those things should happen personally. An RFE already exists to allow packages to explicitly mark certain directories as 'leave unexpected content' but it's still being hashed out as to how it should work since we have to deal with nasty things like dir -> hardlink or dir -> symlink.

Teaching our CPAN module to build IPS packages really requires the on-disk format to be delivered first, so it would have to wait for a little while, and changing the default search path seems best IMO for now.

Is there anyway to get a list of packages that deliver to site_perl out

If you want to find a *specific* directory:

pkg search '/usr/perl5/site_perl'

(note the leading '/')

If you want to find anything that references it:

pkg search site_perl

By the looks of it, only these packages deliver /usr/perl5/site_perl or deliver to it (latest versions only shown):

pkg:/sunwimag...@6.3.4.2-0.126   opensolaris.org
pkg:/sunwperl584c...@5.8.4-0.126 opensolaris.org

Cheers,
--
Shawn Walker
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to