On 2009/09/10 08:17, Chris Bennett wrote: > > > Kami Petersen wrote: > >On 2009-09-10 11:26, Toni Mueller wrote: > >> > >> > >>Hi, > >> > >>I learnt that I can say "pkg_add -ui" to get the latest of everything > >>in my already-installed packages (right?). But I have to install a > >>certain package first, and that's where the question begins: > >> > >>I'd like to be able to eg. say "pkg_add vim_no-x11" and let the package > >>system figure out which one is the latest. So far, I only know how to > >>say "pkg_add vim" or "pkg_add vim-7.2.77-no_x11" if I want the no_x11 > >>flavor. Otherwise, I have to know the specific version, too. > > > > > >man pkg_add: > > > >"In case of ambiguities, for instance: pkg_add screen (matches > >screen-4.02 and screen-4.02-static), pkg_add will error out, unless > >it is invoked in interactive mode (option -i)." > > > > > > > That doesn't really help, since he is talking about "automated" > package installation. > > I have a hunch that there is no answer to that question. > I would find it very convenient to be able to do this, but seems like > an impossible task to properly accomplish. > Seems to me that keeping an up to date mirror of latest packages to > be installed (not any others, though), might work, but only seems > worthwhile for many installs, not just personal use. > > A question, though. Is there a regex that will pull proper package > names, without version numbers from pkg_info on an already up to date > system?? > That would make a clean install easier for a fresh system duplicating > old package set.
With an installed ports tree, you can do something like this: pkg_info -Paq > subdirlist (copy subdirlist around as needed) make FETCH_PACKAGES=yes SUBDIRLIST=subdirlist It's not perfect, but I think it's the closest we currently have to what's being asked for. What would be really nice would be the ability to feed a SUBDIRLIST into pkg_add and have it work without an installed port tree, but without some additional support (e.g. from sqlports or the script piped over for PKG_PATH=scp://) I think it would have to be quite chatty over the wire to fetch the headers of every package and work out which are wanted.
