Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28419

subsequent runs of debian/autobake-deb.sh are not idempotent

    XMLWordPrintable

Details

    Description

      If you run the debian/autobake-deb.sh multiple times on the same source directory it will fail with the error:

      dh: error: debian/control has a duplicate entry for mariadb-plugin-columnstore
      

      This happens because the columnstore section of the autobake-deb.sh script has a simple `cat` statement to add the mariadb-plugin-columnstore package config and it doesn't check if the config has already been added to debian/control, it just blindly adds an additional package config block to the end of debian/control every time it is run.

      This won't ever show up in buildbot because we're always running debian/autobake-deb.sh on a fresh directory. But it becomes a pain when trying to debug package builds locally because you have to remember to remove the columnstore package config from the end of debian/control prior to re-running the script.

      Running the script should be idempotent, meaning back-to-back runs should have the same result assuming no changes have been made to the source tree. The way to fix would be to either:

      1. Add a check to the columnstore section of the script to not run the cat command unless the mariadb-plugin-columnstore package config is missing from debian/control
        ...or...
      2. Add the mariadb-plugin-columnstore package config to debian/control so that it doesn't have to be added at compile time

      Attachments

        Activity

          People

            danblack Daniel Black
            dbart Daniel Bartholomew
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.