-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gsoc2014 #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
success = self.delete_repos(repos) | ||
if success: | ||
success = self.add_repos(repos) | ||
if success and update_news: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could nest it inside the first if condition since if success is False/None it will not enter the condition either way. You can save 1 condition check. Not a big deal though.
This changes all instances of the phrase "Exception, error" to "Exception as error" for py3 compatibility.
Adds py2 unicode compatibility to py3.
Ensures that the necessary strings that need to be unicode, stay unicode in both py2 and py3 when running layman. dbbase.py: Adds py2/py3 unicode compatibility when writing to ElementTree.
Due to repos coming in as a byte string, it needed to be converted to a normal string before joining it in the debug message or it will cause runtime failures. A check to see if the repos variable is an instance of type str instead of type basestring which is no longer available in py3.
To ensure py2/py3 compat, the cmp_to_key function has been used to the convert the variable prio_sort to a key instead of a comparison like py3 returns prio_sort to be.
In order to allow users to set the output for error and normal output we need to check to see if users have set the output to be of type file. In py2 this is specified by the variable "file", however in py3 this is specified by io.IOBase which encompasses all file types such as Raw, Text, and Buffered files.
When checking the selection of which servers to sync/add there is a check to see if 'ALL' is specified. In py2 with argparser this works, but with py3 and argparser, this doesn't work because the 'ALL' string will come in as a bytearray. This commit fixes that by checking the python version and assigning a varaible to be checked instead of a simple string like 'ALL'. It will now come in as either 'ALL' or b'ALL', py version dependent. A small fix is also made to docstring to make the print function py3 compatibile.
Migrate to using ssl-fetch (urllib3 based) for downloading files.
Also alphabetizes group arguments
A temporary variable is assigned to fix the lack of implicit tuple unpacking in py3.
A class which adds support for repos.conf portage configurations is being added.
For compatibility with RepoConfManager, the MakeConf class has been renamed to ConfigHandler as well as adding an update() function as a stub for when RepoConfManager calls it. Changes have also been made to the error output, to allow for later translations.
Three new options have been added to give users repo config configurability.
This class will provide a wrapper for all config types and will also allow for custom config plugins as well.
Since both remotedb.py and tar.py both made use of the same code that determined available proxies, the code has been moved to a function in config.py and both files have been changed to make use of this function.
api.py: incorporates the verify_overlay_src() function
Checks have been added to determine whether or not to readd a repo if the overlay type reported from the remotedb is different from the overlay type reported by the local db.
To update local database and overlay source urls, this function has been created to allow the overlay.type functions to update their source urls in their own methods. source.py: Adds a stub update() function for overlay types that don't have their own update() function.
Moves the fix_git_source() function to allow both add() and update() to make use of it. While the update() function calls git remote set-url, replacing the old url with the new url provided by overlay.update().
Adds _fix_svn_source() function to correct the source url in order to run the svn switch --relocate command.
Also adds _fix_brz_source() function to be used by add() and update().
Also adds _fix_mercurial_source() function to be used by add() and update().
Removed in favor of breaking up the commits into manageable chunks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.