Commit Graph

380 Commits

Author SHA1 Message Date
lxnay
8165dafa9a Entropy:
- move all the code inside the entropy package
- add compat modules outside
Entropy/Transceivers/FtpInterface:
- fix is_file_available to work on more systems


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3146 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-11 00:10:08 +00:00
lxnay
8297695411 Entropy/package:
- move entropyConstants to entropy.const (keep entropyConstants module for backward compat)
- move entropyTools to entropy.tools (keep entropyTools module for backward compat)
- move outputTools to entropy.output (keep outputTools module for backward compat)
- move dumpTools to entropy.dump (keep dumpTools for backward compat)


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3140 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-10 19:15:46 +00:00
lxnay
ecafddafaf Entropy/etpXpak:
- move etpXpak module under the entropy package


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3130 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-08 19:34:05 +00:00
lxnay
e1d0688034 Entropy/entropyTools:
- parallelTask: add get_function method


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3127 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-08 18:29:55 +00:00
lxnay
83e184fc5e Entropy/*:
- make use of the new entropy package structure


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3123 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-08 15:49:55 +00:00
lxnay
715421089b Entropy/MELTDOWN :-):
- entropy modules is now a python package, kept backward compatibility for now


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3121 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-08 15:24:30 +00:00
lxnay
656dc92d20 Entropy/entropyTools:
- import tarfile at module level
- new function universal_uncompress


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3115 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-07 15:21:16 +00:00
lxnay
cc335316b6 Entropy/entropyTools:
- compress_files, new handy function that compresses several files into one (no subdirs handling)


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3113 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-06 20:52:52 +00:00
lxnay
757125acf7 Entropy/entropyTools:
- TimeScheduled: optimize __do_delay
Entropy/EntropyCacher:
- stop(): use Thread.join instead of a while loop
Entropy:
- some minor changes


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3112 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-05 21:38:23 +00:00
lxnay
e960e4afd5 Entropy/entropyTools:
- TimeScheduled: disable accuracy by default
Entropy/Spritz:
- better handle Repositories Updates UI refresh
Entropy/TODO:
- update TODO


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3090 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-03-01 12:48:27 +00:00
lxnay
aefb63a7a3 Entropy/TODO:
- update TODO
Entropy/EquoInterface/ServerInterface:
- they are now singleton, which is a big leap ahead in terms of ease of use
Entropy/Equo/Server:
- text_query, server_query: adapt code to better with singleton EquoInterface/ServerInterface instances
Entropy/Spritz:
- EquoInterface is now singleton, no need to load a global variable
Entropy/urlFetcher:
- add thread_stop_func, speed_limit, OutputInterface parameters to ease behaviour customization
- rename __setup_proxy (private) to _setup_proxy
- add set_id method, useful for thread identification when running multiple instances of urlFetcher
- close() is now a private method
- added thread_stop_func handling, used to stop fetches from other threads
- commit() is now a private method
- add handle_statistics method, if reimplemented, it's handy for controlling dataflow from other threads
Entropy/entropy.py:
- remove some unused functions imported from outputTools
Entropy/EntropyCacher:
- EntropyCacher is now singleton too
Entropy/MultipleUrlFetcher:
- base class that mimics the behaviour of urlFetcher adding the support for multiple simultaneous downloads
Entropy/entropyTools:
- improve xml_from_dict_extended and dict_from_xml_extended functions (add support for None types)
Entropy/entropy.sh:
- pre-declare public functions (pkg_*)


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3078 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-02-27 17:59:34 +00:00
lxnay
764cb47fd0 Entropy/entropyTools:
- force type casting on dict_from_xml_extended

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3075 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-02-25 12:36:15 +00:00
lxnay
b287f7c7b7 Entropy/entropyTools:
- fix dict_from_xml_extended method


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3074 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-02-25 12:24:40 +00:00
lxnay
40caacd0fb Entropy/entropyTools/*:
- new version of parallelTask, API changes, update every part of the code that uses it


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3071 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-02-23 22:56:54 +00:00
lxnay
14134e7007 Entropy/entropyTools/*:
- new version of TimeScheduled, API changes, update every part of the code that uses it


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3070 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-02-23 22:50:34 +00:00
lxnay
f1fe528c55 Entropy/entropyConstants:
- remove etpConst['packagestmpfile']
Entropy/entropyTools:
- getRandomNumber: if /dev/urandom is not available, fallback to random.randint
Entropy/*:
- when strictly required, if /dev/urandom is not available, fallback to random.randint


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3046 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-02-20 18:47:50 +00:00
lxnay
683f43779e Entropy/entropyTools:
- new functions get_operator, catsplit, isvalidatom


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3036 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-02-17 00:57:41 +00:00
lxnay
88c514f51c Entropy/entropyConstants:
- split const_HandleException creating const_kill_threads
Entropy/entropyTools:
- kill_threads uses const_kill_threads
- introduce movefile(), from Portage, that will be used to atomically move files


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3007 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-02-10 16:15:19 +00:00
lxnay
33caba6c93 Entropy/Equo:
- kill all stale threads the hard way when an exception occured
Entropy/Spritz:
- same as above


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2967 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-01-30 08:14:41 +00:00
lxnay
343bd0835f Entropy/ServerInterface:
- when downloading a remote db revision file, check if the download itself went fine
Entropy/SystemManagerExecutorServerRepositoryInterface:
- remove some debugging output


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2935 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-01-20 19:41:22 +00:00
lxnay
66972dd778 Entropy/entropyTools:
- lifobuffer: improve reliability

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2917 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-01-16 21:14:20 +00:00
lxnay
4bf5d1d093 Entropy/entropyTools:
- add two new methods to convert dictionaries to XML and vice versa: xml_from_dict_extended, dict_from_xml_extended


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2868 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-01-08 15:56:43 +00:00
lxnay
98ed3fdc07 Entropy/entropyTools:
- TimeScheduled: add set_delay method
- TimeScheduled: remove try/except from do_delay, no longer needed
- lifobuffer: improve speed, add method clear and make it multithreading aware


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2858 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-01-06 18:48:56 +00:00
lxnay
074bd3d9aa Entropy/entropyTools:
- some optimizations to the elf metadata reading/parsing functions
- new function read_elf_broken_symbols
Entropy/QAInterface:
- libraries_test: implement broken symbols check, optional
Entropy/ServerInterface:
- always enable broken symbols check on libtest


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2830 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-01-02 13:10:57 +00:00
lxnay
ff606ff438 Entropy/entropyTools:
- bye bye old uncompressTarBz2 function


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2823 cd1c1023-2f26-0410-ae45-c471fc1f0318
2009-01-01 17:31:10 +00:00
lxnay
93176ad2ca Entropy/entropyTools:
- applicationLockCheck: raise SystemExit exception instead of sys.exit
Entropy/EquoInterface:
- changed dependencies calculation results, always pull in updated dependencies, deep_deps now works with revisions, disabled 'needed' check
Entropy/entropyConstants:
- fix a small bug in const_setupEntropyPid: that caused to report entropy as locked if entropy.pid is found but empty


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2819 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-12-31 08:33:18 +00:00
lxnay
4bf56a99c3 Entropy/TODO:
- update TODO
Entropy/entropyConstants:
- say goodbye to etpRSSMessages
- other cosmetical fixes
Entropy/EquoInterface:
- close LogFile instance's file on instance delete
- wipe os.system() calls
- rewrite get_meant_packages() to use SOUNDEX features of SQLITE3
- replace old and slow filterSatisfiedDependencies with get_unsatisfied_dependencies, which is faster and more reliable (added NEEDED check by default)
- improve speed of generate_dependency_tree
- improve speed of get_required_packages
- fix get_world_update_cache_hash()
- improve speed of retrieveInstallQueue
- make __unpack_package reporting the right error on uncompressTarBz2 if this crashes
- remove Python 2.4/2.5 workarounds since they are not needed anymore, being entropyTools.uncompressTarBz2 fixed forever (handling UTF-8 filenames correctly)
- adjust __move_image_to_system for the changes above
- __move_image_to_system, if an error is caught on shutil.move, do not crash but report it to user instead
Entropy/TriggerInterface:
- replace os.system() with subprocess.call()
- remove unused nspluginwrapper trigger
Entropy/ErrorReportInterface:
- add locale output
- get the full content of ps auxf, not just the first 80 chars
- update handler accordingly (handlers/)
Entropy/LogFile:
- close log file on object deletion
Entropy:
- import subprocess by default
Entropy/EntropyDatabaseInterface:
- remove etpRSSMessages and use a ServerInterface variable instead
- add new method getVersioningData, useful to speed up other Entropy areas
- improving speed of other functions adding more one-liners conditionals
- add new method retrieveNeededRaw, useful to speed up other Entropy areas
- improve speed of retrieveDependenciesList, everything can be done at SQL level
- new method searchSimilarPackages that uses SOUNDEX to retrieve similar package/atom names
- improve speed of listAllCategories
- shrink databaseStructureUpdates
- remove old and dusted method
- improve speed of doDatabaseImport
- improve speed of database_checksum
- group multiple .cursor.execute using .cursor.executescript
- improve speed of __filterSlotTagUse
Entropy/entropyTools:
- improve speed and reliability of uncompressTarBz2


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2818 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-12-30 18:43:16 +00:00
lxnay
5337fdec11 Entropy/caches:
- remove cache global variables
- say goodbye to const_resetCache, not needed anymore


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2783 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-12-14 13:23:52 +00:00
lxnay
47c6252dc1 Entropy/TimeScheduled:
- make possible to sleep before spawning the function
Entropy/EquoInterface:
- packageSetMatch: return empty tuple if no matches are found (instead of empty dict) when multiMatch is not enabled
- generate_dependency_tree(): add flat option, to return a yet ordered dependencies list (instead of a dict)
- generate_dependency_tree(): slightly update speed when creating the final dictionary
Entropy/phpBB3AuthInterface:
- make possible to disable the update of the session table
Entropy/UGCCacheInterface:
- get_package_downloads(): always return int


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2744 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-12-09 13:12:31 +00:00
lxnay
6f7cd190e9 Entropy/entropyTools:
- add extract_packages_from_set_file method, just a helper function
Entropy/Package Masking inteface reworked:
- etpConst['packagemasking'] is gone, the Package masking interface changed name, now it's called PackageSettings and is a standalone class that can work like a simple python dictionary object
- adapt all the code to the new interface, which is close to final and pretty solid if compared to the old one etpConst['packagemasking'] dict and its issues (like being un-initialized)
Entropy/Package sets support:
- implement server-side methods (ServerInterface) to collect repository-defined sets
Entropy/urlFetcher:
- move some init code to stand-alone functions (setup_proxy and setup_resume_support method)


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2733 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-12-07 19:28:05 +00:00
lxnay
7ace4938ce Entropy/entropyTools:
- uncompressTarBz2: fix typo

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2700 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-11-21 14:38:33 +00:00
lxnay
5e89bd7ce4 Entropy/entropyTools:
- improve uncompressTarBz2

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2699 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-11-21 09:10:20 +00:00
lxnay
d304069ae9 Entropy/entropyTools:
- create generic functions to ease entropy package atom and filename strings creation


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2662 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-11-09 19:32:55 +00:00
lxnay
f6c7cb49e0 Entropy/EquoInterface:
- split extract_pkg_metadata(): cross fingers, needs testing
Entropy/entropyTools:
- add sum_file_sizes function


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2660 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-11-09 17:38:21 +00:00
lxnay
9d21894af9 Entropy/DistributionUGCInterface:
- add search_iddoc_item method to search available document identifiers
Entropy/RepoInterface:
- implement system make.conf sanity check
- implement automatic /etc/make.profile updates
Entropy/entropyConstants:
- add rootdir prefix to spm configuration files
Entropy/entropy.py:
- general tidy
Entropy/entropyTools:
- add function to determine if a path is sane or not (is_valid_path)


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2658 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-11-09 16:06:20 +00:00
lxnay
aa7eebdf2a Entropy:
- we are now >=Python2.5 only, sorry 2.4


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2602 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-31 21:23:00 +00:00
lxnay
3583fa67d6 Entropy/entropyTools:
- uncompressTarBz2(): catch EOFError exceptions and return -1
Entropy/PackageInterface:
- __unpack_package(): when running fetch_step, check if returns 0
- try to unpack the package 3 times before giving up, if it fails, try to redownload it again


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2589 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-29 13:05:41 +00:00
lxnay
c57e70f332 Entropy/entropyTools:
- getRandomNumber(): use os.urandom()
- dep_getkey(): check if input param is valid


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2579 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-28 11:28:17 +00:00
lxnay
935f5903fa Entropy/entropyTools:
- add helper functions is_valid_ascii() and is_valid_unicode()


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2559 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-24 09:57:00 +00:00
lxnay
ab4d586b9f Entropy/phpBB3AuthInterface:
- add valid password range
- add valid username range
Entropy/EAPI3/Client:
- do not crash if repository, arch or product are None (while converting to coloured output) in convert_stream_to_object()


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2543 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-23 12:01:48 +00:00
lxnay
1dc14f2dca Entropy/EquoInterface:
- implement safe mode feature -> EquoInterface.safe_mode status integer, first function to use it is EquoInterface.openClientDatabase()
- openClientDatabase() make possible to start an EquoInterface instance with a corrupted/non-existant installed packages database (safe mode) which can be detected by client interfaces (Equo/Spritz)
Entropy/EntropyDatabaseInterface:
- improve branch support (and speed) for client database (installed packages db)
Entropy/rssFeed:
- make it a generic RSS handling class
Entropy/ServerInterface:
- make changes to rssFeed instances to reflect the change above
Entropy/Repository Manager:
- add support for notice boards handling
Entropy/ServerInterface:
- add support for notice boards handling
Entropy/EquoInterface:
- add support for notice boards


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2521 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-13 17:14:06 +00:00
lxnay
76d8d9596c Entropy/TODO:
- update TODO
Entropy/Equo:
- add installed packages database backup/restore tools
Entropy/EquoInterface:
- add backup/restore database helper functions
Entropy/EntropyDatabaseInterface:
- fix getIDPackageFromDownload()
Entropy/entropyTools:
- add compress_file() function (uncompress_file() already present)


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2518 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-11 21:11:07 +00:00
lxnay
9347bd4f24 Entropy/entropyTools:
- spawnFunction(): add the ability to provide a callback function to read the child pid id
Entropy/Repository Manager:
- make possible to stop any queued command that calls spawnFunction (85% of them)


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2515 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-10 20:22:16 +00:00
lxnay
b4e6609cf4 Entropy/FtpInterface:
- improve FTP uri parser, move to entropyTools
- fix issues when no directory path is specified


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2514 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-10 19:24:02 +00:00
lxnay
8553d11794 Entropy/entropyTools:
- improve remove_usedeps()


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2482 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-06 17:43:08 +00:00
lxnay
25836b46b7 Entropy/entropyTools:
- add a function to truncate a file till its first newline char


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2450 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-10-03 01:56:42 +00:00
lxnay
149c1ca5a2 Entropy/Portage:
- add EAPI2 support (entropyTools)
Entropy/atomMatch:
- add support for matching USE flags and Portage EAPI2 syntax


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2445 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-09-30 11:41:33 +00:00
lxnay
6380f2d8ec Entropy/entropyTools:
- fix issues with xgettext


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2443 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-09-30 10:08:41 +00:00
lxnay
ab1a96446b Entropy/entropyTools:
- dict_from_xml(): make it working for empty strings


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2435 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-09-29 19:50:15 +00:00
lxnay
578b5080b1 Entropy/entropyTools:
- improve parallelTask class by storing the function result into self.result


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2416 cd1c1023-2f26-0410-ae45-c471fc1f0318
2008-09-24 13:17:17 +00:00