Summary: | MySQL cache backend for portage | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Roman Gaufman <hackeron> |
Component: | Enhancement/Feature Requests | Assignee: | Portage team <dev-portage> |
Status: | VERIFIED LATER | ||
Severity: | enhancement | CC: | chtekk, gentoo.org, gentoo, greg_g, kostasp, langthang, moixa, port001, radek, reiner.block, support, tradergt |
Priority: | High | Keywords: | Inclusion |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://oneofone.limitlessfx.com/phpwiki/index.php/temp/portage_db_mysql.py | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
/etc/portage/modules
portage-init-db.sql /usr/lib/portage/pym/portage_db_mysql.py new version init-portage-db.sql new module simple search script to replace esearch |
Description
Roman Gaufman
2004-05-21 16:01:20 UTC
Created attachment 31813 [details]
/etc/portage/modules
Created attachment 31814 [details]
portage-init-db.sql
Created attachment 31815 [details]
/usr/lib/portage/pym/portage_db_mysql.py
*** Bug 35103 has been marked as a duplicate of this bug. *** `equery list package` `ecat -v package` do not work with this method. gentoolkit-0.2.0_pre8 # equery list -i -o -p squirrelmail Searching for package 'squirrelmail' in all categories among: * installed packages * Portage tree (/usr/portage) * overlay tree (/usr/local/portage) [-P-] [ ~] mail-client/squirrelmail-1.4.3-r1 (1.4.3-r1) [-P-] [ ] mail-client/squirrelmail-1.4.3 (1) [-P-] [ ] mail-client/squirrelmail-1.4.3_rc1 (1) [-P-] [ ~] mail-client/squirrelmail-1.4.3_rc1-r1 (1.4.3_rc1-r1) Exception exceptions.AttributeError: "'NoneType' object has no attribute 'close'" in <bound method Cursor.__del__ of <MySQLdb.cursors.Cursor instance at 0x40a94aac>> ignored # etcat -v squirrelmail [ Results for search key : squirrelmail ] [ Candidate applications found : 4 ] Only printing found installed programs. * mail-client/squirrelmail : [ ] 1.4.3_rc1 (1) [ ~ ] 1.4.3_rc1-r1 (1.4.3_rc1-r1) [ ] 1.4.3 (1) [ ~ ] 1.4.3-r1 (1.4.3-r1) Exception exceptions.AttributeError: "'NoneType' object has no attribute 'close'" in <bound method Cursor.__del__ of <MySQLdb.cursors.Cursor instance at 0x409f202c>> ignored Created attachment 32679 [details]
new version
new version to fix the bugs reported before.
Created attachment 32680 [details]
init-portage-db.sql
the new sql file needed, please drop the old database first then
mysql -u root < init-portage.db.sql
Requirements: The module needs to be self-contained. It need to be able to create or alter the tables itself without user intervention. If you post changes to something PATCH IT please. I don't like spending time to see what was done. Created attachment 37914 [details]
new module
This is a new version, uses a sep. table for package info.
It also handle creating tables.
Just drop all the tables in portage db, install this module and emerge
sync/regen.
please note that you must have the user/database created already or it won't
work.
This works only on .51*
Created attachment 37916 [details]
simple search script to replace esearch
this a simple script to replace esearch, with support for searching USE,
provides, keywords (~x86, etc),categories, licenses.
chmod +x it then ./myportage-search.py -h for more details
I am getting errors.. I deleted the tables.. and let the portage user create them again.. Here is what I get: Regenerating cache entries... processing app-accessibility/SphinxTrain error processing app-accessibility/SphinxTrain-0.9.1-r1, continuing... (Error inserting/updating the database ('UNUSED_01').) processing app-accessibility/brltty processing app-accessibility/festival error processing app-accessibility/festival-1.4.3-r1, continuing... (Error inserting/updating the database ('UNUSED_01').) error processing app-accessibility/festival-1.4.3-r2, continuing... (Error inserting/updating the database ('UNUSED_01').) processing app-accessibility/flite Caught signal 2 in pid 26020 {'keys': 0, 'set': 9, 'del': 0, 'get': 21} {'keys': 0, 'set': 9, 'del': 0, 'get': 21} Exiting due to signal The grants for mysql are: +-------------------------------------------------------------------------------------------------------+ | Grants for portage@%.smelser.org | +-------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'portage'@'%.smelser.org' | | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, LOCK TABLES ON `portage`.* TO 'portage'@'%.smelser.org' In the new version I got those "Error inserting/updating the database ('UNUSED_01')" flooding my console as well, even though the MySQL grants were OK. I had to revert back to http://bugs.gentoo.org/show_bug.cgi?id=51704#c6.. Seems to work fine on .51 Putting a hold on feature requests for portage as they are drowning out the bugs. Most of these features should be available in the next major version of portage. But for the time being, they are just drowning out the major bugs and delaying the next version's progress. Any bugs that contain patches and any bugs for etc-update or dispatch-conf can be reopened. Sorry, I'm just not good enough with bugzilla. ;) Closing due to old age (doesn't work with portage-2.1). |