New fedora 37 template failing to update

Aloha all

After finally upgrading fedora template from 34 to 37, i was prompted to update newly installed and created templates. 2 out of 6 updates failed. Any idea why and how to resolve this issue?

 ID: Disable deltarpm
      Function: file.append
          Name: /etc/dnf/dnf.conf
        Result: False
       Comment: An exception occurred in this state: Traceback (most recent call last):
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/state.py", line 2276, in call
                    ret = self.states[cdata["full"]](
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 149, in __call__
                    return self.loader.run(run_func, *args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1228, in run
                    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1243, in _run_as
                    return _func_or_method(*args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1276, in wrapper
                    return f(*args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/states/file.py", line 6431, in append
                    if __salt__["file.search"](
                       ^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 149, in __call__
                    return self.loader.run(run_func, *args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1228, in run
                    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1243, in _run_as
                    return _func_or_method(*args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/modules/file.py", line 3141, in search
                    return replace(
                           ^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/modules/file.py", line 2516, in replace
                    flags_num = _get_flags(flags)
                                ^^^^^^^^^^^^^^^^^
                  File "/var/tmp/.root_dd8a91_salt/pyall/salt/modules/file.py", line 1643, in _get_flags
                    _flag = getattr(re, str(flag).upper())
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                AttributeError: module 're' has no attribute 'RE.MULTILINE'
       Started: 02:08:26.263768
      Duration: 8.473 ms
       Changes:   
  ----------
            ID: update
      Function: pkg.uptodate
        Result: False
       Comment: One or more requisite failed: update.qubes-vm.Disable deltarpm
       Started: 02:08:26.272756
      Duration: 0.004 ms
       Changes:   
  ----------
            ID: notify-updates
      Function: cmd.run
          Name: /usr/lib/qubes/upgrades-status-notify
        Result: True
       Comment: Command "/usr/lib/qubes/upgrades-status-notify" run
       Started: 02:08:26.272803
      Duration: 1925.067 ms
       Changes:   
                ----------
                pid:
                    1027
                retcode:
                    0
                stderr:
                stdout:
  
  Summary for fedora-37-software
  ------------
  Succeeded: 4 (changed=1)
  Failed:    2
  ------------
  Total states run:     6
  Total run time:   9.422 s
  /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
    warnings.warn("Setuptools is replacing distutils.")

Note: I modified your post, just a preformat on the update failure text output.

You choose the very complex way to update your template. The very simple way is to download a new fedora-37 template with qvm-template-ui…

See the official doc : templates/fedora/#upgrading

1 Like

I actually did it the easy/recommended way as suggested by qubes docs. I tried to “reinstall template” according to your above link and still not able to upgrade. any other suggestions?

It’s difficult to help you if you don’t give details and error messages…

I pasted the errors above in itial thread. I get 2 fails out of 6 updates. I also deleted and re installed ffedora 37 still recieving the same failed updates. I am currently using fedora 34

ID: Disable deltarpm
      Function: file.append
          Name: /etc/dnf/dnf.conf
        Result: **False**
ID: update
      Function: pkg.uptodate
        Result: **False**
       Comment: One or more requisite failed: update.qubes-vm.Disable deltarpm

This bug: Fedora 37 fails to update via salt. · Issue #7891 · QubesOS/qubes-issues · GitHub

A package containing a workaround for that bug has already been shipped to the stable repository, so please run sudo dnf update --refresh directly in your fc37 template. Then the update via Qubes Manager should work.

1 Like

Solved. Thank you

Thank you for the help Fedora44.

It is unfortunate that the leadership in this thread gave incorrect help blaming the user, falsely stating they had not pasted errors, and distracting from the actual bug.

Another example of unfortunately hostile moderation. More to the point, it gets in the way of someone like me who comes along looking for a solution to a bug.

1 Like