Skip to content
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

Closed
wants to merge 37 commits into from
Closed

Gsoc2014 #1

wants to merge 37 commits into from

Conversation

twitch153
Copy link
Contributor

No description provided.

success = self.delete_repos(repos)
if success:
success = self.add_repos(repos)
if success and update_news:

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.

Devan Franchini added 29 commits June 1, 2014 20:15
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.
@twitch153 twitch153 closed this Jun 2, 2014
@twitch153
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants