Skip to main content

A pacman update script

Project description

pacupdate - A pacman update script

I don't like pacman wrapper programs that obfuscate the entire package management process away from you. Nevertheless, keeping a pacman-based system up-to-date can be tedious as it often involves more than just running pacman -Syu. So here's a Python script that runs through the complete upgrade process (as I understand it). Specifically, these are the steps that the script covers:

  • Update the mirrorlist if necessary
  • Check if there have been any updates to the Arch News mailing list since the last upgrade
  • Check for updates to packages from the pacman repos and from the AUR
    • AUR packages will be considered outdated if any of their dependencies are scheduled for an upgrade
    • AUR packages whose names end in "-git" will also be considered outdated if their upstream git repository has been updated during the last 2 weeks (by default)
  • Upgrade all packages that are out-of-date
    • this includes the full build process for AUR packages
  • Print out any warnings that Pacman issued during the upgrade process
  • Clean up any build dependencies installed during upgrades that are no longer needed

Options

Okay, so there's a bunch of environment variables you can set to customise the script's behaviour:

  • PACUPDATE_MIRRORLIST_URL
    URL from which pacupdate will download a fresh mirrorlist. Should be customised to fit with the system's physical location.
    Default: "https://archlinux.org/mirrorlist/?country=all&protocol=http&protocol=https&ip_version=4"
  • PACUPDATE_RSS_FEED_URL
    Address from which pacupdate will fetch a current copy of the news mailinglist. No real reason to change this.
    Default: "https://archlinux.org/feeds/news/"
  • PACUPDATE_MIRRORLIST_INTERVAL
    Interval in days after which a new copy of the mirrorlist should be downloaded. Determined based on the modification timestamp of the system's current mirrorlist.
    Default: 14
  • PACUPDATE_GIT_INTERVAL
    Interval in days after which a git AUR package (a package with a name that ends in "-git") will be checked for updates in its upstream repository.
    Default: 14
  • PACUPDATE_PM_ROOT
    The root path used by libalpm for all filesystem operations. You most likely do not need or want to change this.
    Default: "/"
  • PACUPDATE_PM_DBPATH
    Path to libalpm's database.
    Default: "/var/lib/pacman"
  • PACUPDATE_PM_CONF
    Path to pacman's configuration file.
    Default: "/etc/pacman.conf"

Warning!

As is to be expected, this script will execute some commands with elevated privileges using the sudo command. You should not execute a script (most likely one with zero stars, no less) that will run sudo-prefixed commands without checking the source for what those commands are first.

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

pacupdate-0.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pacupdate-0.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file pacupdate-0.1.tar.gz.

File metadata

  • Download URL: pacupdate-0.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pacupdate-0.1.tar.gz
Algorithm Hash digest
SHA256 9b8d16120a16648572548d3cd2d3754a994c0def5bdd4149fc57f2409876e585
MD5 5d6a7a84324b5b2e30c9718dc075b987
BLAKE2b-256 f1f1aae2b9e1b69403995a32d39ac43ae5f1a33d3b0dac41cca2a8eb3b2ec987

See more details on using hashes here.

File details

Details for the file pacupdate-0.1-py3-none-any.whl.

File metadata

  • Download URL: pacupdate-0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pacupdate-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5106399ecc111a6fd0e778b69e5e9bd89c0cac45c9b5e15e49eef9c215853eef
MD5 03f52becef00ed931300ed0f58afd971
BLAKE2b-256 f6b17792a472ea0a86cb45a499929bc86d1c47eb2221f4699b4b74e6d13c9583

See more details on using hashes here.

Supported by

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