path: root/layman
Commit message (Collapse)AuthorAgeFilesLines
* utils.py: Removes catching KeyboardInterruptDevan Franchini2016-11-091-3/+0
| | | | | | As per bug 539336 it's near impossible to kill a stampeding layman process. This was due to the run_command() function which caught the KeyboardInterrupt exception.
* layman/module.py: Fix commit 63808ef00f94 mis-applied 'sourcefile' attribute ↵Brian Dolbec2016-05-101-5/+6
| | | | | | | | | changes It was not looking for the 'sourcefile' attribute first, then falling back to the kidname for backward compatibility. It was incorrectly looking for an ImportError, instead of a 'sourcefile' KeyError. The filepath of the affected file for the error message had an extra leading '_'. Add the module name to the warning message.
* Bumps version number to Franchini2016-05-091-1/+1
* Adds sourcefile var to inits for plug-in modulesDevan Franchini2016-05-0917-1/+25
| | | | | X-Gentoo-Bug: 582154 X-Gentoo-Bug-URL: https://bugs.gentoo.org/582154
* version.py: Changes version to reflect updateDevan Franchini2016-04-301-1/+1
* Repairs layman-updater rebuild functionalityDevan Franchini2016-04-302-5/+6
| | | | | | reposconf.py: Adds rebuild __init__ parameter to fix rebuild functionality updater.py: Sets rebuild parameter for repos.conf ConfigHandler class
* remotedb.py: Removes climit param for internel _fetch_file() paramsDevan Franchini2016-03-091-2/+2
| | | | | As _fetch_file() is for fetching internal files and does not use ssl-fetch it should not have climit as a parameter.
* remotedb.py: Adds climit param to _fetch_file() definitionDevan Franchini2016-03-091-1/+1
| | | | | Following up on the updating of ssl-fetch's API update in commit 5ffbc7ae to make use of climit parameter.
* dbbase.py: adds return value for read_db()Devan Franchini2016-02-291-1/+1
* Adds error reporting for db read failuresDevan Franchini2016-02-294-66/+95
| | | | | If the database back-end fails to be read then layman will properly report it and exit without causing an ugly traceback.
* remotedb.py: Update for latest ssl-fetch APIBrian Dolbec2016-01-291-0/+6
* module.py: fixes bug where the module_spec module name was not usedDevan Franchini2015-12-301-1/+1
| | | | | This only showed up when the module's target name (filename) was not the same as the modules initialization name.
* remotedb.py: Add climit due to sslfetch API changeBrian Dolbec2015-12-261-3/+3
* updater.py: Sets set_db_type installed var to new_nameDevan Franchini2015-11-281-1/+1
| | | | | | Previously the set_db_type function would be passed the old installed database name instead of the new one. This would lead to setting the "installed" variable in the layman config to an incorrect one.
* updater.py: Adds expected "." to database migration check to ensure proper ↵Devan Franchini2015-11-281-1/+1
| | | | backup naming
* dbbase.py: Whitespace cleanupDevan Franchini2015-10-161-3/+3
| | | | | Shamelessly hiding the fact that I'm also ammending the lack of self.db_type use in the remove() function.
* updater.py: Alters the way migrate_database handles an invalid db_typeDevan Franchini2015-10-161-2/+1
| | | | | | Instead of showing the user the error and raising an exception, an alternative method of dying after hitting the error has been implemented.
* dbbase.py: Creates internal function to get database module controllerDevan Franchini2015-10-161-19/+24
| | | | | | This internal function centralizes the functionality of getting the database module controller while also adding in checks to gracefully handle invalid module names.
* Improved grammarPastafarianist2015-09-231-1/+1
| | | | Signed-off-by: Devan Franchini <twitch153@gentoo.org>
* api.py: Corrects typo in enable/disable_repo functions()Devan Franchini2015-09-051-2/+2
| | | | References git issue #30.
* overlay.py: Fixes method of assigning owner info if contact attrib is foundDevan Franchini2015-08-271-23/+26
| | | | | | | | Prior to this commit the overlay would not set the owner info if the contact attribute was found, breaking backwards compatibility. To allow for this backwards compatibility while maintaining multiple owner support layman will be defaulting to the "contact" attribute if it is present in any XML overlays.
* Deprecates get_all_info() functionDevan Franchini2015-08-274-105/+22
| | | | | | | | | | | | | | The api function get_all_info() is being deprecated as it was much slower than the get_info_str() function and was no longer used in layman's code. The only instance found making use of it was older test code which has been changed to also use the get_info_str() function. external.py: Deprecates the get_all_info() function and adds multiple owner testing compatibility. api.py: Removes the get_all_info() function. cli.py: Removes commented out use of get_all_info() function. global-overlays.json: Changes structure of 'owner' attribute to reflect changes for multiple owner support.
* overlay.py: Modifies __eq__ attribute requirementsDevan Franchini2015-08-271-2/+2
| | | | | | The previous method still made use of owner_name and owner_email to see if the two were equal while it should've been checking for the "owners" overlay attribute.
* maker.py: Modifies query promptsDevan Franchini2015-08-271-43/+27
| | | | | | These modifications remove a lot of duplicated prompts that were created when trying to prompt the user for an item that could be of more than one value.
* maker.py: Adds multiple owner user queryDevan Franchini2015-08-271-2/+18
* utils.py: Gives create_overlay_dict a well needed updatingDevan Franchini2015-08-271-5/+4
| | | | | | As this function exists with the API consumer in mind the function was well overdue for getting it the result keys updated to reflect all the ongoing changes in layman's API.
* Adds multiple owner support to layman overlaysDevan Franchini2015-08-272-96/+137
* overlay.py: Improves to_json() setting of descriptionsDevan Franchini2015-08-271-3/+1
* Adds remove parameter to database write() functionDevan Franchini2015-08-155-9/+12
| | | | | | | | | This parameter has been added in order to obtain proper parallelization support for layman sqlite databases. With this additional parameter it prompts the sqlite db module's write function to simply return when removing an overlay, preventing it from re-adding any database entires and causing oddness, run-time errors, or other unwanted badness.
* sqlite_db.py: Modifies owner information gathering methodDevan Franchini2015-08-131-14/+9
| | | | | | Due to the fact that including the owner name isn't necessary layman needed to modify the way it gathered owner information to prevent run-time errors.
* sqlite_db.py: read_db() connects to database with "with" commandDevan Franchini2015-08-051-53/+54
* Adds remove function for overlay removal from databasesDevan Franchini2015-08-058-12/+53
| | | | | | sqlite_db.py: Also changes the way in which feeds are gathered in read_db(), this shows the nature of feeds being an unrequired attribute of the overlay.
* update.py: Adds functionality to ensure proper sqlite migrationDevan Franchini2015-08-031-1/+4
* Adds SQLite databasing module supportDevan Franchini2015-08-033-1/+357
| | | | | | constants.py: Adds sqlite to list of supported database modules. setup.py: Adds db_modules.sqlite_db.sqlite_db to list of installable modules.
* overlay.py: Reorganizes imports and cleans up init paramsDevan Franchini2015-08-031-3/+5
* overlay.py: Adds optional license attribute to overlay objectDevan Franchini2015-07-211-0/+19
* external.py: Adds json DB testingDevan Franchini2015-07-203-1/+73
| | | | updater.py: Adds proper line spacing for database migration output
* updater.py: Modifies the db_type setting methodDevan Franchini2015-07-181-11/+25
| | | | | | | | | In order to preserve the config file set up of the layman config file the set_db_type() function has been modified to not use configparser as it doesn't preserve comments. Changes have also been made in case the database file ends with the old extension, so the backup name will end in ".bak" as opposed to the database's file type.
* updater.py: Adds database migration toolDevan Franchini2015-07-171-1/+104
* updater.py: Cleans up importsDevan Franchini2015-07-171-5/+4
* Removes unnecessary "_db" appendage to db_type varDevan Franchini2015-07-174-15/+15
| | | | | | | To avoid namespace collisions in py2.7 the database modules needed to have "_db" appended to their name. In order to avoid having this ugliness in the user's config file and elsewhere in layman's code the DbBase class simply adds the "_db" portion of the name itself.
* constants.py: Adds constant DB_TYPES for supported db checkingDevan Franchini2015-07-171-10/+17
* version.py: Changes version to 2.4.0-gitDevan Franchini2015-07-151-1/+1
| | | | | As the next release will include some noticeable changes an increment of the second version number in layman was necessary.
* dbbase.py: Optimizes if check for db_typeDevan Franchini2015-07-151-4/+9
* overlay.py: Adds better error handling for missing "source" entriesDevan Franchini2015-07-141-4/+10
* external.py: Modifies ovl_dict keys to conform to new changesDevan Franchini2015-07-141-2/+2
* external.py: Adds db_type config option to tests which need itDevan Franchini2015-07-141-4/+6
| | | | | | The Overlay, DbBase, and DB would require the db_type config option to be set. To prevent it from falling back on config option defaults it's best to specify it.
* dbbase.py: Adds limitation to use only one db typeDevan Franchini2015-07-131-19/+29
* overlay.py: Renames overlay variable to json to match parameterDevan Franchini2015-07-131-28/+28
* overlay.py: Fixes any other mistakes made in hasteDevan Franchini2015-07-131-2/+5