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.4.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.4-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pacupdate-0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 d31bc5da4c1e0678835cf6b73e6de655c8d10345c08ed1693e177088c62c46f2
MD5 11dc39d21a607a37e8ab1f315a6d0b73
BLAKE2b-256 3d151e894558fdb38340428e98448bbbfe36c4b35a56ec5b00cc3e48396f49cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pacupdate-0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.4 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 15d3526f62f8bf71bafd9b1386bdedc141466cd05eda5ebba214cb1aabac2dfc
MD5 abf14c71bff51263dab1dffdfe1e0ca3
BLAKE2b-256 c1504f8fb241207e4f8f8a6d82b589419ecb6e3e6f0687bafa07413e025cbaf7

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