tech-pkg archive

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

Re: pkg_add and remote packages



Dieter Baron wrote:
On Fri, Apr 04, 2008 at 06:05:51PM -0400, Johnny C. Lam wrote:
Dieter Baron wrote:
In article <47F68F28.7060006%pkgsrc.org@localhost> Johnny wrote:
  That's nice, but the problem Joerg ran into also happens for single
package installs with specified version: finding out about missing
dependencies.  How does ruby gems handle that?
The YAML file includes all of the dependency information for each gem, so you can determine what's needed without needing to fetch or inspect the gem itself. I feel this is the right thing to do in pkg_summary if we don't already do this.

  pkg_summary also contains that information.

  However, you said:

: If you ask the "gem" tool to install a particular remote gem by name : *and* version, then it grabs it directly from the gems directory. :

  What if the gem depends on other gems?  Can gems be installed out of
order?

Gems express dependencies using the following operators:

    (none)      any version is okay
    =1.1        exactly version 1.1 is required
    >=1.0    at least version 1.0
    <2.0     less than version 2.0
    ~>1.1.5  any version at least 1.1.5 where last number can change

The last operator is the unusual one. It's implemented by taking the last component of the version, in this case it's the "5", and allowing that component to increment. It's supposed to allow for expressing "all versions along one branch of development/release". This is a very nice expression that we should put into pkgsrc dependencies.

All of the operators can be used in combination with each other.

Gems can be forcibly installed out of order, but by default, all dependencies must be installed before the gem itself can be installed.

        Cheers,

        -- Johnny C. Lam


Home | Main Index | Thread Index | Old Index