(Jul 18 2005 10:18) Brian Wilson wrote:
> The problems with search the swup databases are
>
> 1) swup is slow, it has to connect to some remote place on each invocation
> and download files (or confirm local copies are up to date; whatever it
> does is slow) It's fine for updates but too slow for searching
I have a setup with 2 contrib sites and 3 main sites, so my setup should
be about average when it comes to speed.
[EMAIL PROTECTED] ~# time swup --search-package mysql
(...)
real 0m9.553s
user 0m1.230s
sys 0m0.240s
(This is the normal case, swup has run over the night and the local
repository is almost up to date.)
[EMAIL PROTECTED] ~# swup --flush-cache && time swup --search-package mysql
(...)
real 0m13.388s
user 0m3.870s
sys 0m0.300s
(This is when downloading everything)
[EMAIL PROTECTED] ~# time swup --search-package mysql
(...)
real 0m4.615s
user 0m1.280s
sys 0m0.130s
The last run only validates the files. If 5-14 seconds is too slow for
you, and you feel increased speed is worth a possible outdated response,
then the web-thing is absolutely something to consider.
[EMAIL PROTECTED] ~# swup --flush-cache && time swup --search-file libbz.*
(...)
real 0m16.409s
user 0m3.490s
sys 0m0.760s
[EMAIL PROTECTED] ~# time swup --search-file libbz.*
(...)
real 0m5.947s
user 0m2.540s
sys 0m0.260s
Searching files takes a bit longer since it's a lot more files than
packages. 6 seconds is indeed within my attention span, but I can
understand that 16 is too much for some.
I think Morten once suggested adding a switch to make sure that only
cached data was used when doing searches, but I disagree. Only the first
search will take time downloading stuff, and any subsequent searches
will simply use the updated data and take minimum time. In my opinion
this is a low price to pay for the benefit of getting a correct result.
> 2) options are obscure and hard to remember
--search-file List package(s), providing file(s) matching a
pattern
--search-package Search for package(s), if name matching a
pattern
--search-resource Search for resource(s), if name matching a
pattern
Well, they all start with '--search-' and end with the type of search
you want. The only option that people may have a hard time understanding
is '--search-resource', since the notion of resources is not that easy
to grasp.
A resource can be a file, or a package, but in most cases it's neither.
Resources are what is missing when people not using swup experiences
"rpm hell": Some package require some resource(s) that are not
available.
Play with resources:
"rpm -q --provides glibc" lists the resources provided by glibc.
"rpm -q --requires glibc" lists the resources required by glibc.
"rpm -q --whatrequires libpthread.so.0" lists the packages that requires
the resource libpthread.so.0
"rpm -q --whatprovides libpthread.so.0" lists the package(s) that
provides the resource libpthread.so.0
> 3) requires root access
This is just plain wrong.
For swup to work for your user you simply need to import the required
gpg keys:
[EMAIL PROTECTED] ~$ swup --import-key
/usr/share/tsl-gpgkeys-sunchild/trustix-sunchild.pub.gpg
Import of key(s) succeded.
[EMAIL PROTECTED] ~$ swup --import-key
/usr/share/tsl-gpgkeys-sunchild/trustix-sunchild-contrib.pub.gpg
Import of key(s) succeded.
[EMAIL PROTECTED] ~$ swup --search-package mysql
Fetching upgrade info for site: mirror.230780.net Community contrib
Downloading latest.rdf.gz - done
Parsing file: latest.rdf - done
Fetching upgrade info for site: Community contrib
Downloading latest.rdf.gz - done
Parsing file: latest.rdf - done
Fetching upgrade info for site: mirror.230780.net
Downloading latest.rdf.gz - done
Parsing file: latest.rdf - done
Fetching upgrade info for site: Trustix http
Downloading latest.rdf.gz - done
Parsing file: latest.rdf - done
Fetching upgrade info for site: Trustix ftp
Downloading latest.rdf.gz - done
Parsing file: latest.rdf - done
Found 15 package(s) matching "mysql":
courier-imap-mysql-3.0.8-10tr
exim-mysql-4.52-1ta
mysql-4.1.12-2tr
mysql-bench-4.1.12-2tr
mysql-client-4.1.12-2tr
mysql-devel-4.1.12-2tr
mysql-libs-4.1.12-2tr
mysql-shared-4.1.12-2tr
perl-dbd-mysql-3.00.01-1ni
php-mysql-5.0.4-7tr
php-mysqli-5.0.4-7tr
php4-mysql-4.4.0-1tr
postfix-mysql-2.1.5-15tr
samba-mysql-3.0.14a-3tr
ulogd-mysql-1.23-1or
When run as user it creates a local directory ($HOME/.swup) where it
stores the keyrings and the cached data. You can even have your own
swup.conf residing there.
> A web-based version should solve all three problems.
I would love a web-searchable thing for Trustix packages. It sounds
really neat and might prove valuable.
However, I also feel that only your first point is valid, and the second
one is a matter of using swup 2-3 times learning the three search
options.
> It's slow enough that I usually do something else while waiting
> for it to complete.
Busy man. :)
> Since my idea is that this feature (a database, that is, not swup) is
> intended to help newbies it should have extensive text search
> capabilities, my example was bad,
> as I already know about dos2unix -- a newbie should be able to
> search on terms like "text file conversion".
Ahh, searching the Summary and Description fields sounds like a great
idea! Maybe not for swup (needs to download everything) but for a
web-searchable database it sounds perfect. :)
> Having it at your site would be a form of marketing, "here is what
> we have to offer", people could paw around in the database without
> installing TSL.
If you get something up and running that works, we will seriously
consider adding that to the site.
kind regards
c
--
Christian H. Toldnes
Trustix Developer
_______________________________________________
tsl-discuss mailing list
[email protected]
http://lists.trustix.org/mailman/listinfo/tsl-discuss