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.3.tar.gz (13.3 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.3-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pacupdate-0.3.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pacupdate-0.3.tar.gz
Algorithm Hash digest
SHA256 87bdcbce1ebfe748f7d9e410b0f637791c6b5e8c51873ccc278e7ae259336c25
MD5 91968622f18a5e290b0857baeca49e57
BLAKE2b-256 0cfcb499be4bf9ada98ec09b1fbcb70e7561cd0d1854484efa98727114f77d46

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pacupdate-0.3-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pacupdate-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dceb40de7d30133c4ce5635dde14d0bc4e1551b95c00198837689fc0a676dad5
MD5 801cc092852e37da480a2d5fe63f4c78
BLAKE2b-256 f6528ec6a68245312dd97a7729119d3849a34ef137f5b778f1e136cb486641b1

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