public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Package Grep source and Program not installed functionality
@ 2008-07-29 12:12 John Morrison
  2008-07-29 14:16 ` Brian Dessent
  0 siblings, 1 reply; 4+ messages in thread
From: John Morrison @ 2008-07-29 12:12 UTC (permalink / raw)
  To: cygwin-apps

Hi All,

Would it be possible to extend the cgi

http://cygwin.com/cgi-bin2/package-grep.cgi

to (optionally) output plain text instead of the formatted HTML?

Add a output=text instruction?  If the source is available I'd be willing
to see if I could do the mod.  I was thinking of some kind of command line
which would simplify the users finding out what package they would need to
install to access a particular tool, for example on my ubuntu machine;

john@hela:~$ gedit
The program 'gedit' is currently not installed.  You can install it by
typing:
sudo apt-get install gedit
bash: gedit: command not found

Perhaps the cygwin version could be

john@cygwin:~$ curl
The program 'curl' is currently not installed.  You can install it from
the following package(s);
	curl/curl-7.15.1-1	command line tool for transferring files with HTTP,
HTTPS, FTP, etc.
	curl/curl-7.15.4-1	command line tool for transferring files with HTTP,
HTTPS, FTP, etc.
	curl/curl-7.16.3-1	command line tool for transferring files with HTTP,
HTTPS, FTP, etc.

where the tool could use the package-grep.cgi?output=text&grep=/curl.exe

I don't know how the instruction get's fired, is there something in bash
which says "run this if you don't find a program"?

What do you folks think?  Doable?  Useful?

John.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Package Grep source and Program not installed functionality
  2008-07-29 12:12 Package Grep source and Program not installed functionality John Morrison
@ 2008-07-29 14:16 ` Brian Dessent
  2008-07-29 16:37   ` John Morrison
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Dessent @ 2008-07-29 14:16 UTC (permalink / raw)
  To: John Morrison; +Cc: cygwin-apps

John Morrison wrote:

> Would it be possible to extend the cgi
> 
> http://cygwin.com/cgi-bin2/package-grep.cgi
> 
> to (optionally) output plain text instead of the formatted HTML?
> 
> Add a output=text instruction?  If the source is available I'd be willing
> to see if I could do the mod.  I was thinking of some kind of command line
> which would simplify the users finding out what package they would need to
> install to access a particular tool, for example on my ubuntu machine;

This already exists, it's spelled "cygcheck -p".

Brian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Package Grep source and Program not installed functionality
  2008-07-29 14:16 ` Brian Dessent
@ 2008-07-29 16:37   ` John Morrison
  2008-07-29 17:13     ` Brian Dessent
  0 siblings, 1 reply; 4+ messages in thread
From: John Morrison @ 2008-07-29 16:37 UTC (permalink / raw)
  To: cygwin-apps

On Tue, July 29, 2008 3:13 pm, Brian Dessent wrote:
> John Morrison wrote:
>
>> Would it be possible to extend the cgi
>>
>> http://cygwin.com/cgi-bin2/package-grep.cgi
>>
>> to (optionally) output plain text instead of the formatted HTML?
>>
>> Add a output=text instruction?  If the source is available I'd be
>> willing
>> to see if I could do the mod.  I was thinking of some kind of command
>> line
>> which would simplify the users finding out what package they would need
>> to
>> install to access a particular tool, for example on my ubuntu machine;
>
> This already exists, it's spelled "cygcheck -p".

I didn't know.  Thanks for the sarcasm.  God I'd forgotten just how nasty
this list can be.  And all for wanting to make cygwin a 'nicer'
environment for new/inexperienced users.

J.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Package Grep source and Program not installed functionality
  2008-07-29 16:37   ` John Morrison
@ 2008-07-29 17:13     ` Brian Dessent
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Dessent @ 2008-07-29 17:13 UTC (permalink / raw)
  To: John Morrison; +Cc: cygwin-apps

John Morrison wrote:

> > This already exists, it's spelled "cygcheck -p".
> 
> I didn't know.  Thanks for the sarcasm.  God I'd forgotten just how nasty
> this list can be.  And all for wanting to make cygwin a 'nicer'
> environment for new/inexperienced users.

Seriously, no snark intended.  You asked about adding feature X to
package-grep.cgi, but feature X already exists and is used by cygcheck
to implement -p.

As far as auto-suggesting things when commands aren't found, I think
there are a lot of implications to consider:

- privacy aspects of every user's misspelled commands ending up in
sourceware logs
- latency aspects of delaying the prompt by a HTTP roundtrip and a
sourceware grep for each missing command
- increased load on sourceware
- implications for offline/disconnected users
- large amounts of output when a command matches a string in lots of
packages

As far as I know ubuntu can simply query the local APT database which is
a different prospect entirely than initiating a HTTP request to a remote
server.

Brian

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-29 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-29 12:12 Package Grep source and Program not installed functionality John Morrison
2008-07-29 14:16 ` Brian Dessent
2008-07-29 16:37   ` John Morrison
2008-07-29 17:13     ` Brian Dessent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).