How does one stage multiple transactions offline?

Example

Say that I want to invoke the undermentioned with upgrade’s offline flag appended: [1]

  1. sudo dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin

  2. #!/usr/bin/env sh
    sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld && \
    sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld
    

Desire

However, I want to invoke them in the same sudo dnf5 offline reboot transaction.

Query

How can I accomplish this?

Rationale

  1. I don’t wish to reboot for each command.
  2. Attempting to stack them sequentially like one would a series of pre-aurhenticated -ys invokes offline clean for each subsequent invocation.

  1. rpmfusion.org/Howto/Multimedia ↩︎

1 Like

Running multiple dnf {install/upgrade/swap/etc} commands with the --offline option is not a solution, as you might have already experienced, since upon running the second command (without rebooting), the first one will be canceled:

There is already an offline transaction queued, initiated by the following command:
	dnf swap mesa-va-drivers mesa-va-drivers-freeworld --offline
Continuing will cancel the old offline transaction and replace it with this one.

It seems that dnf only accepts one offline transaction at a time. Stacking offline transactions would make sense though.

2 Likes
1 Like

For the sake of correctness (here and in the reported issue), you might want to update the 2nd example, which seems to be missing an operator between the two sudo dnf swap commands.

1 Like

@tqcharm, thanks. Done.

1 Like