6

Does anybody know what do-release-upgrade -q actually does?

Hopefully it does the upgrade without the need to interact with it, if this is the case does it overwrite configs or keep the originals?, or does it do something else?

stephenm@mcr-pc-29392:~$ do-release-upgrade --help
Usage: do-release-upgrade [options]

Options:
  -h, --help            show this help message and exit
  -V, --version         Show version and exit
  -d, --devel-release   Check if upgrading to the latest devel release is
                        possible
  --data-dir=DATA_DIR   Directory that contains the data files
  -p, --proposed        Try upgrading to the latest release using the upgrader
                        from $distro-proposed
  -m MODE, --mode=MODE  Run in a special upgrade mode. Currently 'desktop' for
                        regular upgrades of a desktop system and 'server' for
                        server systems are supported.
  -f FRONTEND, --frontend=FRONTEND
                        Run the specified frontend
  -s, --sandbox         Test upgrade with a sandbox aufs overlay
  -c, --check-dist-upgrade-only
                        Check only if a new distribution release is available
                        and report the result via the exit code
  -q, --quiet

The man page does not even mention it.

DO-RELEASE-UPGRADE(8)                                                                                                  DO-RELEASE-UPGRADE(8)

NAME
       do-release-upgrade - upgrade operating system to latest release

SYNOPSIS
       do-release-upgrade [options]

DESCRIPTION
       Upgrade  the  operating  system  to  the  latest  release from the command-line.  This is the preferred command if the machine has no
       graphic environment or if the machine is to be upgraded over a remote connection.

OPTIONS
       -h, --help
              show help message and exit

       -d, --devel-release
              Check if upgrading to the latest devel release is possible

       -p, --proposed
              Try upgrading to the latest release using the upgrader from Ubuntu-proposed

       -m MODE, --mode=MODE
              Run in a special upgrade mode. Currently "desktop" for regular upgrades of a desktop system and "server"  for  server  systems
              are supported.

       -f FRONTEND, --frontend=FRONTEND
              Run the specified frontend

       -s, --sandbox
              Test upgrade with a sandbox aufs overlay

SEE ALSO
       update-manager(8), apt-get(8)

2 Answers 2

4

Okay so I looked into this by testing it, I Installed a virtual Ubuntu 10.04 edited some config files and ran do-release-upgrade -q,

It ran exactly the same I had all the same questions to answer regarding mysql passwords, and modified configs.

This led me to look at the code to figure what it exactly does. The code for do-release-upgrade is here

Looking through it looks like using the -q option simply omits a tiny bit of output.

This is the only stuff it omits as far as I can tell.

if not options.quiet:
    print _("Checking for a new ubuntu release")

..

if not options.quiet:
      print _("No new release found")

...

if not options.quiet:
      print _("Release upgrade not possible right now") 
      print _("The release upgrade can not be performed currently, "
              "please try again later. The server reported: '%s'") % m.new_dist.upgrade_broken
    sys.exit(NO_RELEASE_AVAILABLE)

It looks like this does nothing else other than omit the above output, which in the grand scheme of the upgrade output is minute to say the least.

2

For a non-interactive upgrade, you can specify the --frontend=DistUpgradeViewNonInteractive option.

Mode details from:

script with sudo:

apt-get upgrade -y
apt-get dist-upgrade -y
apt-get install -y update-manager-core
iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'  # optional, in case upgrade fails
do-release-upgrade --frontend=DistUpgradeViewNonInteractive
1
  • there is a typo in the system command: the single quote. If a typo is one character why the heck Stackoverflow says that an edit must be at least 6 characters?
    – maxadamo
    Jul 25, 2021 at 7:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .