radareorg / r2pm

Radare2 cross platform package manager
GNU Lesser General Public License v3.0
34 stars 12 forks source link

Simple dependency support #1

Open XVilka opened 6 years ago

XVilka commented 6 years ago

Allow to set the dependency following something like these rules

depends: qwe
depends: qwe < 0.4
depends: qwe <= 0.5
depends: qwe > 1.4.5
depends: qwe >= 1.5.6
depends: 5.5 > qwe <= 8.0
radare commented 6 years ago

Its already done

On 27 Jun 2018, at 11:20, Anton Kochkov notifications@github.com wrote:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

XVilka commented 5 years ago

Not in r2pm.go

qbarrand commented 5 years ago

@XVilka then I think that packages with the git type should point to a specific reference - no point in adding a version property in the YAML file if the package is always fetching master.

XVilka commented 5 years ago

@qbarrand agree, no need for this for git packages.

imyxh commented 4 years ago

As far as I understand it, the r2pm repository is only designed to hold the latest version of each package at a time. If that's true, how can we have versioned dependencies? Tying packages to r2 versions (as proposed here) should fix most compatibility issues anyway, imo.

The cleanest (albeit pretty slow) solution I can think of when dependencies update themselves is this: let's say the user is on radare2-4.4.0, and installed foopkg-4.4.0 a month ago. Now they want to install barpkg-4.4.0, which depends: foopkg.

R2pm then has to reinstall barpkg's dependency (foopkg) to ensure that it is at the latest version that the package manager intends to install for the given r2 version. For example, if the git tag has moved to a newer commit, or a zip file has been updated. Then r2pm can install barpkg.

Downsides:

Advantages:

Thoughts? If we want to avoid the downsides mentioned I think we pretty much have to start storing foopkg-4.4.0-1, foopkg-4.4.0-2, etc. as different packages on the same repo and it would get cluttered. Would be more of a system like python-pip and less of a simple/clean plugin manager.