Google Summer of Code/2022/Ideas/Portage code modernisation

From Gentoo Wiki
Jump to:navigation Jump to:search

Portage code modernisation

Portage's codebase is aging (as old as Gentoo!) and needs modernisation for contemporary Python style and techniques. This project involves picking components of the Portage codebase, understanding it, annotating it (with extensive comments), and then refactoring as appropriate.

A lot of this technical code debt makes implementing new GLEPs and features more expensive and time-consuming than it needs to be. This project is to work on modernising the codebase in appropriately-sized chunks. Rewriting whole modules is less important than documenting the existing code, as well as researching the reasons for its existing behaviour, and refactoring (even small amounts) in the course of that work.


Contacts Required Skills
  • Python
  • Familiarity with git (including finding why code was added in the first place, relevant bugs, etc)
Expected Project Size Expected Outcomes

175 hours or 350 hours, depending on appetite for larger refactoring.

  • Documenting (inc. commenting) sufficient files, modules, and components of Portage
  • Important modules within the agreed-upon component(s), e.g. depgraph.py would be documented, with appropriate code-cleanups made, and refactored & split into appropriate abstractions, allowing further work to be done in future (e.g. incorporating different dependency resolvers).
  • Refactoring segments once understood. The aim is to first document the reason for existence of functions, conditions, edge cases, and so on, and then to refactor (even only locally/scoped only to within function(s) as-you-go) to improve readability, efficiency, and correctness.
Project Difficulty

Easy or Medium. Some sections will be easier and the codebase is large enough so that people can choose components according to the appropriate difficulty.