![](https://secure.gravatar.com/avatar/a52180e24a72c78dc830624b240c5795.jpg?s=120&d=mm&r=g)
Hi, Victor Martinez wrote:
On Wed, 18 Jun 2008 08:15:37 +0200 Johannes Winkelmann <jw@smts.ch> wrote:
There are two major chances:
1. User interface: less commands --------------------------------
Many of its current features weren't there from the start, and I've usually chosen to add a separate 'command' (think: prt-get <command> ...), for example depends/deptree/dependent. In addition, there's a major overlap between some of the commands in query (printf is just a more specific form of either list or info, depending on the filter argument). For a long time, I wanted to change this, and finally got around it. That might look like this:
[old] [new] prt-get depends <port> pgt depends <port> prt-get deptree <port> pgt depends -T <port> prt-get quickdep <port> pgt depends -Q <port> prt-get dependent <port> pgt depends -R <port> (reverse)
prt-get diff [<port>] pgt diff [<port>] prt-get quickdiff [<port>] pgt diff -Q [<port>]
Note how -Q has the same meaning. There a list of mapping here: http://jw.smts.ch/pg-ng In this list, the 'depends' subcommand is replaced and grouped by the 'dep' one, which sounds better for me. Other subcommands replacements as 'find' are fine too, but I have in my mind an alternative for 'sysup'. Both 'up' and 'sysup' subcommands could be grouped into the 'up' one, -N and -D options are shared and, as I known 'up' is a subset of 'sysup'. So for me sounds better:
prt-get up prt-get update <options> package prt-get sysup prt-get update -a (means try to update all packages installed) You're mixing upper with lowercase options, (e.g: pgt diff -Q, pgt find -f) and IMO they should be in lowercase. Also, there are a number of subcommands still without alternatives in your list, like: path, dup, listorphans, dumpconfig, cache, ...
2. Dependency handling ---------------------- When prt-get was introduced, the "Depends on:" header was optional (and somtimes even frowned upon). As a consequence of this, the default 'install' command did not install dependencies. As a side effect, 'update' and 'sysup' never got --with-deps options, since it's impossible to tell whether a user omitted a dependency by calling 'install' instead of 'depinst' or whether it was introduced in the last update (think: pkgutils and libarchive).
Nowadays, things are different: we expect people to install dependencies, and if errors get reported we typically ask first whether all dependencies are met. Therefore, I'd suggest the following:
- pgt install <port> would install <port> and its dependencies (like depinst) - pgt update <port> would install <port>'s missing dependencies, and update <port> - pgt sysup would install all missing dependencies, and update outdated ports in the system
All commands will get a -N/--no-deps switch to really only handle a single port, however the next update or sysup will of course bring them back.
In other words prt-get no more silently assumes that the user didn't want a particular dependency. In this way, you remove the diy though by default. I mean, you make things automated instead of let the user keep track of ports/packages. This sure will avoid some errors (using install instead of depinst and automated keep track of new dependencies of ports when you make a sysup). Maybe this switch can be added to prt-get.conf for anyone who keep track manually his ports. Now, if you don't want a package (and believe it's only an optional dependency for your usage pattern although the maintainer listed it), 'optional dependency' ?? :-) IMO. maintainers only should list necessary deps, and the rest ones should be listed as # Optional: But this is another point for discussions. you can still do it, but explicitely by calling 'pgt lock' on an uninstalled package. Locked packages won't be touched by any pgt command (but there will be a warning printed in the end of install if a locked dependency was requested in that transaction).
If I understand it well, I think it's the same functionallity like we have now with prt-get (a locked port isn't touched) adding the new warning print and the fact of locking not installed ports too.
Seems that now you can lock some deps listed by the Maintainer for building the port, so the lock switch should be accompanied by 'ignore footprint' or something similar (the built package surely differs from the original one). Just it keeps the DIY feature.
As mentioned, I'd like to hear your comments on those two changes. I'm sure both will take some time to get used to (heck, even the new name; I keep typing 'prt-get' on the machine where I installed pgt to test it ;-)), but are worth it in the long run.
Personally I don't like the idea of changing the 'prt-get' name. Well, I'm waiting a release candidate or beta for testing it.
Best regards, Jose V Beneyto