tech-pkg archive

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

Re: pkg_summary to include PKGBASENAME and PKGVERSION?

On Fri, Apr 24, 2009 at 11:13:57AM +0200, iMil wrote:
> Please. Have a look at pkg_summary(5) and see, for example, PKGNAME and  
> PKGPATH entries for apache and php-mysql :

The request was about adding the base name and the version, which is 5
lines of code to extract from the full package name.

> apache has 3 versions, apache 1.3.x, apache-2.0 and apache-2.2, here an  
> easy way of detecting which apache is to be installed is to use its  
> PKGPATH name (apache, apache2, apache22). Of course I could ask the user  
> but that would compromise an automatic mode.

Apache is a kind of bad example, like MySQL. Compare how this is dealt
with for PostgreSQL. Ultimately you have to either second guess or ask
the user what she means for "install apache". In fact, "install apache"
means exactly that -- give me the newest version of apache present
(apache-2.2). You might want to try to do a smarter selection if the
user is also giving you more input by requesting e.g. ap22-subversion or
if she is explicitly qualified the version (e.g. apache<2.2).


Home | Main Index | Thread Index | Old Index