Yes, this is critical, this is a hanging issue, on my slower systems, waiting for responce from portage takes up to 20 minutes in some cases, this is not acceptable and easily fixed with the solution bellow: I've come across this improvement to portage, the steps are explained on this site, and I summarize them bellow: the 3 required files are to follow with attachments. 1) emerge mysql-python 2) /etc/init.d/mysql start 3) mysql -u root -p < portage-init-db.sql 4) create: /usr/lib/portage/pym/portage_db_mysql.py 5) create: /etc/portage/modules 6) emerge regen Reproducible: Always Steps to Reproduce: 1. emerge something 2. hang yourself after waiting for response for over 10 minutes 3. Expected Results: fast responce, would be very nice if this is (atleast optionally) implemented into portage. Have everything needed for used to just specify USE_MYSQL=yes in /etc/make.conf or something.
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).