On 01/28/2014 10:33 AM, Lee Braiden wrote:
I agree with this.  What I'd want is much more like apt (add
repositories, update lists of available packages from those
repositories, manage priorities between repositories, say that one
repository should be preferred over another for a particular package,
working in specific prefixes (/usr/local, /usr, /,
~/Projects/something-requiring-old-libs), but rust-specific and platform
independent.

What you actually want is Paludis[0], which installs from source. I'd propose it as a standard Rust package manager, but it does have some serious flaws for that purpose:

- Designed as the package manager for a full Linux distro, so it wants to handle everything by itself. If you give it a build dependency on gcc, it'll want to maintain the entire toolchain.
- No Windows support.
- Hard dependency on `bash`.

That said, it has solved a serious number of PM problems we should learn from:

- Completely build system agnostic. All tooling is done in bash libraries called `exheres`, with an infinite number of customization hooks from patching to post-install. Can build everything from glibc to xmonad. - Separate set of build and run dependencies, with configurable install root: you can (probably) bootstrap an embedded Linux with it. - Metadata lives in a number of git repos you can cherry-pick. Creating your own is *easy*.
- Some support for external package sources, like Hackage.
- Fast[1] dependency handling including cycles and both global and local keywords: `doc` pulls in the doc build tools, `bash_completion` installs relevant extra files, `texture-float` enables patented code in mesa.
- Installing from source control.
- All user-facing configuration is done in /etc/paludis, where you can apply keywords, CFLAGS, mirrors, scm options, mask/unmask packages etc. on a per-package per-version basis with globs and stuff.


tl;dr If you want to design a package manager, bootstrap an Exherbo[2] first.




[0]: http://paludis.exherbo.org/overview/features.html
[2]: http://exherbo.org/
[1]:
```
# time cave resolve world --everything
Done: 2501 steps
<snip>
Executing pretend actions: 265 of 265

 * You have 6 unread news items (use 'eclectic news' to read)

real    0m16.108s
user    0m12.706s
sys     0m1.643s
```
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to