User Tools

Site Tools


sisyphus

Sisyphus

Sisyphus is the package manager used in Redcore Linux. In it's essence Sisyphus is a simple wrapper around portage, gentoolkit, and portage-utils that provides an apt-get/yum-alike interface to these commands, to assist newcomer people transitioning from Debian/RedHat-based systems to Gentoo.

Sisyphus is written in python3 and is divided in 3 parts :

  • libsisyphus - a python library which acts as a backend and wraps portage, gentoolkit and portage-utils functionality
  • sisyphus-cli - the command line interface frontend, exposes functions wrapped by libsisyphus
  • sisyphus-gui - the graphical user interface frontend, a simple PyQt5 frontend to libsisyphus

Although basic functionality is in place and working, Sisyphus is under active development, so many things may be added, changed or removed from it.

Libsisyphus

Libsisyphus is a python library which acts as a backend for Sisyphus, and wraps portage, gentoolkit and portage-utils functionality, but is not limited to that :

  • it will make sure that the portage tree, the redcore-desktop overlay && the portage configuration is always synced with the binhost repository following the recomandations of Gentoo binary package guide.
  • using an internal sqlite3 database it will keep track of every package installed through sisyphus-cli, sisyphus-gui or even portage itself
  • using an internal sqlite3 database it will keep track of every package available in the binary repository

The last 2 features will work only if the Redcore Linux is running in binary or hybrid mode. As soon as Redcore Linux is converted into full blown Gentoo Linux or is running in source mode, Sisyphus will refuse to work, although this limitation can be lifted or worked around by the user.

Note : for more information about Redcore Linux system modes, please read Vasile article!

Sisyphus CLI

Sisyphus CLI is the command line interface frontend. It exposes functions wrapped by libsisyphus in a apt-get/yum-alike fashion.

As of this writing, version 0.1-r3 it exposes the following commands :

  • install - Install new packages
  • uninstall - Uninstall packages *safely* (INFO : If reverse deps are found, package(s) will NOT be uninstalled)
  • force-uninstall - Uninstall packages *unsafely* (WARNING : This option will ignore reverse deps, which may break your system)
  • remove-orphans - Uninstall packages that are no longer needed
  • upgrade - Upgrade the system
  • auto-install - Install new packages - no confirmation
  • auto-uninstall - Uninstall packages *safely* - no confirmation (INFO : If reverse deps are found, package(s) will NOT be uninstalled)
  • auto-force-uninstall - Uninstall packages *unsafely* - no confirmation (WARNING : This option will ignore reverse deps, which may break your system)
  • auto-remove-orphans - Uninstall packages that are no longer needed - no confirmation
  • auto-upgrade - Upgrade the system - no confirmation
  • search - Search for packages
  • update - Update the Portage tree, Overlay(s), Portage config files && Sisyphus database remote_packages table
  • sysinfo - Display information about installed core packages and portage configuration

Install a package:

  sisyphus install package(s)

Portage command (wrapped):

  check if portage tree is up to date
  check if overlay(s) are up to date
  check if portage configuration (useflags, keywords, masks) are up to date
  check if there are new or upgraded packages in the binary repository 
  emerge -a package(s)

Uninstall a package safely (calculate reverse deps):

  sisyphus uninstall package(s)

Portage command (wrapped):

  check if portage tree is up to date
  check if overlay(s) are up to date
  check if portage configuration (useflags, keywords, masks) are up to date
  check if there are new or upgraded packages in the binary repository
  emerge --depclean -a package(s)

Uninstall a package unsafely (ignore reverse deps):

  sisyphus force-uninstall package(s)

Portage command (wrapped):

  check if portage tree is up to date
  check if overlay(s) are up to date
  check if portage configuration (useflags, keywords, masks) are up to date
  check if there are new or upgraded packages in the binary repository 
  emerge --unmerge -a package(s)

Remove no longer needed packages (installed as deps for another package):

  sisyphus remove-orphans

Portage command (wrapped):

  check if portage tree is up to date
  check if overlay(s) are up to date
  check if portage configuration (useflags, keywords, masks) are up to date
  check if there are new or upgraded packages in the binary repository
  emerge --depclean -a

Upgrade the system:

  sisyphus upgrade

Portage command (wrapped):

 check if portage tree is up to date
 check if overlay(s) are up to date
 check if portage configuration (useflags, keywords, masks) are up to date
 check if there are new or upgraded packages in the binary repository 
 emerge -uDaN --with-bdeps=y @world

While using plain (non-auto) options Sisyphus will behave a bit different than portage, meaning will not execute the requested operations right away. Portage doesn't care if the binary repository is up to date (by default is a source based package manager), but Sisyphus does, so before executing the requested operations it will peform a check.

If the system is out of sync, will prompt for update and exit. Users will have to sync their systems.
If the system is already in sync, it will execute the requested operations.

Install a package (no confirmation):

  sisyphus auto-install package(s)

Portage command (wrapped):

  emerge --sync (update portage tree and overlays)
  update portage configuration (useflags, keywords, masks)
  update internal database with new or upgraded packages on binary repository
  emerge package(s)

Uninstall a package safely (no confirmation):

  sisyphus auto-uninstall package(s)

Portage command (wrapped):

  emerge --sync (update portage tree and overlays)
  update portage configuration (useflags, keywords, masks)
  update internal database with new or upgraded packages on binary repository
  emerge --depclean package(s)

Uninstall a package unsafely (no confirmation):

  sisyphus auto-force-uninstall package(s)

Portage command (wrapped):

  emerge --sync (update portage tree and overlays)
  update portage configuration (useflags, keywords, masks)
  update internal database with new or upgraded packages on binary repository
  emerge --unmerge package(s)

Remove no longer needed packages (no confirmation):

  sisyphus auto-remove-orphans

Portage command (wrapped):

  emerge --sync (update portage tree and overlays)
  update portage configuration (useflags, keywords, masks)
  update internal database with new or upgraded packages on binary repository
  emerge --depclean -q

Upgrade the system (no confirmation):

  sisyphus auto-upgrade

Portage command (wrapped):

  emerge --sync (update portage tree and overlays)
  update portage configuration (useflags, keywords, masks)
  update internal database with new or upgraded packages on binary repository
  emerge -uDN --with-bdeps=y @world

While using auto options, Sisyphus will behave a bit more like portage, meaning will execute requested operations right away. Same as in plain(not-auto) options, Portage doesn't care if the binary repository is up to date (by default is a source based package manager), but Sisyphus does, so before executing the requested operations it will perform an auto-sync.

Search for package(s):

  sisyphus search package(s)

Portage command (wrapped):

  emerge --search package(s)

Update the Portage tree, Overlay(s), Portage config files && Sisyphus database remote_packages table:

  sisyphus update

Portage && other command(s) (wrapped):

  emerge --sync (update portage tree and overlays)
  update portage configuration (useflags, keywords, masks)
  update internal database with new or upgraded packages on binary repository
  

Display information about installed core packages and portage configuration:

  sisyphus sysinfo

Portage command (wrapped):

  emerge --info

As you can see, Sisyphus takes some aditional steps before asking portage to execute requested operations. That is because when using binary packages with portage, the clients must always be in sync with the server. Specially on the useflag, keyword, mask department. If a package has one useflag enabled on the server, but the client requests the same package with the same useflag disabled because he is out of sync, portage will simply refuse to install it. The aditional steps taken by Sisyphus prevent this from happening.

Development

  • wrap gentoolkit (equery files, equery belongs, equery depends)
  • wrap portage-utils (qcheck, qfile, qsize, qdepends, qlist etc.)

Sisyphus GUI

Under heavy development, not yet ready!!!

Slight old (3 months) demo, code improved a lot since then:
https://www.youtube.com/watch?v=cwiFKhLhPr8&t=95s

sisyphus.txt · Last modified: 2017/07/07 16:58 by v3n3rix