Skip to main content

`mozilla-releng/mozilla-linux-pkg-manager` is a Python tool for managing Mozilla `.deb` packages.

Project description

Task Status pre-commit.ci status Code Coverage Documentation Status License

mozilla-linux-pkg-manager

mozilla-releng/mozilla-linux-pkg-manager is a Python tool for managing Mozilla product packages hosted in Linux software repositories. It can be used to clean-up obsolete Firefox Nightly versions.

Requirements

  • Python 3.11 or higher
  • Poetry (for dependency management)

Installation

  1. Install Poetry: If not already installed, install Poetry by following the instructions from the official Poetry website.
  2. Clone the Repository: Clone the mozilla-linux-pkg-manager repository using the command git clone https://github.com/mozilla-releng/mozilla-linux-pkg-manager.git.
  3. Install Dependencies: Navigate to the repository's root directory and run poetry install to install the required dependencies.

Running mozilla-linux-pkg-manager

To run mozilla-linux-pkg-manager, use Poetry with the following command:

poetry run mozilla-linux-pkg-manager clean-up --product [PRODUCT] --channel [CHANNEL] --retention-days [DAYS]

Parameters

  • --product: Specifies the Mozilla product to manage (e.g. nightly, release, beta). Currently, only firefox is supported.
  • --channel: Specifies the package channel (e.g. nightly, release, beta). Currently, only nightly is supported.
  • --retention-days: Sets the retention period in days for packages in the nightly channel. This parameter is only supported on the nightly channel.

Example

To clean up nightly packages that are older than 7 days:

poetry run mozilla-linux-pkg-manager clean-up --product firefox --channel nightly --retention-days 7

Building and Installing a Python Wheel

The mozilla-linux-pkg-manager package can be packaged into a wheel file for distribution and installation.

Building the Wheel

  1. Navigate to the Project Directory: Open your terminal and navigate to the directory where your project is located.
  2. Build the Package: Execute poetry build to create the wheel file. This will generate a dist folder in your project directory containing the .whl file, whose name may vary based on the version and build.

Installing the Wheel File

  1. Navigate to the dist Directory: Move to the dist directory where the .whl file is located.
  2. Install the Wheel File: Use pip install [wheel-file-name] to install the package. Replace [wheel-file-name] with the actual name of the wheel file generated during the build process.

Using the Installed Package

After installation, the package can be used from anywhere on your system, provided you are running the Python interpreter where it was installed. For example:

mozilla-linux-pkg-manager clean-up --product firefox --channel nightly --retention-days 3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mozilla_linux_pkg_manager-0.1.0.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

mozilla_linux_pkg_manager-0.1.0-py3-none-any.whl (10.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page