* David Golden <[EMAIL PROTECTED]> [2008-03-26T18:02:55]
> On Wed, Mar 26, 2008 at 5:23 PM, Ricardo SIGNES
>   5. cpan://index/02packages.txt.gz
> 
> That could be used as a uniform way to address index files scattered across
> the authors/, modules/, and indices/ directories.
> 
> I don't like "file" because that's not the only way to address files.  I would
> do (4) like this:
> 
>   4a.  cpan://author/HDP/Your-Face-0.01.tar.gz

Yes, both good.

> >  (2) would refer to the dist per se, not anything like "latest version"
> 
> That's what I don't really get.  What does that *mean*?  If a URI is supposed
> to identify a resource (c.f
> http://en.wikipedia.org/wiki/Uniform_Resource_Identifier),
> what "resource" does (2) identify?  I said "latest" because that attempts to
> pin it to a specific resource.  In the abstract, it doesn't seem to have any
> standard meaning and thus no real utility.  What's the use case?  Maybe that
> will help us pin it down.

I am going to be verbose and pedantic.  Please know that I am not trying to
sound like a jerk:

In the CPAN, there are dists, which are largely "any understood archive, but
especially one that contains either META.yml or is laid out with modules and
other stuff we recognize."  META.yml helps make clear what a dist is.  Dists
have prerequisites.  Packages don't.  That's why it's important to have a dist
as a thing.

So, I think we agree already that a versioned dist, probably almost analagous
to the archive containing it, is a thing.  Is a dist name also a thing?  I
think so.  In our project, which does things like say, "this version of this
dist has these packages as prerequisites," can end up with a lot of mappings
like this:

  [ Dist, Version ] -> [ [ Package, Version ], ... ]
                    -> PAUSE id
                    -> other meta information

Using the dist name alone lets you point to the group of all dists using that
name as their name.  This is already useful!

  http://search.cpan.org/dist/SOAP-Lite

It shows me a dist, with a listing of all of the currently available versions,
even if they are not the source of packages that end up in 02packages!  It also
happens to show me information about the most recent uploaded one, or possibly
the one with the most recent indexed packages, etc.  Still, the "dist name
alone" is a useful resource locator.

I can also imagine:

  knight!rjbs:~$ cpan-idx viewdist SOAP-Lite

showing me a listing of specific versions.  Now, you were right: it's totally
possible for both of us to upload distinct dists that both claim to be Foo-Bar
version 1, with distinct packages provided.  I don't know what search.cpan.org
does in this case, but it is not an unsolveable problem.  The complete
specifier for a dist is -- by gum -- the locator for the file!  Still, the dist
name itself *is* a useful locator.

Now, is this useful?

  cpan://dist/Foo-Bar/1.2

I don't know.  It would be "all dists with the given version and name."  In
nearly every case, I imagine, that will be one dist.  Sometimes it will be two.
It would be pretty cool to let a tool, with a good index available, resolve
that into a file if possible and (depending on the use case) into many files or
an exception if not.

  knight!rjbs:~$ cpan-idx unpack cpan://dist/Foo-Bar/1.2
  cpan-idx: Sorry, there are two dists available for that locator:
    * cpan://author/RJBS/Foo-Bar-1.2.tar.gz
    * cpan://author/DAGOLDEN/Foo-Bar-v1.2.zip

Is this only useful when a good index has been constructed?  Yes.  I think
that's fine.

> 
> *** Summary -- proposed definitions ***
> 
> 4) Distribution -- refers to a distribution tarball indexed in 02packages;
> could include an optional version; if the data were available, it could
> refer to any distribution ever indexed in any 02packages file historically;
> Without a distribution name or author, refers to all indexed distributions
> or all indexed distributions by a particular author:

My disagreement with this should be clear from the above.  I think that using
02packages as a source for distribution indexing is going to be a losing
proposition.

> What do you think?

Mostly, I agree with you!

-- 
rjbs

Reply via email to