openhab / openhab/openhab-linuxpkg

dpkg-reconfigure does not re-run the upgrade tool

Open
#240 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
18
Forks
35
PR merge metrics
No merged PRs in 30d

Description

upgrade tool has it's own logic to skip steps which have been done in the past.

When doing a dpkg-reconfigure openhab, I get something like this

[openHAB] Running JSON Database upgrade tool (${OPENHAB_RUNTIME}/bin/upgradetool.jar).
[main] INFO org.openhab.core.tools.UpgradeTool - Already executed 'itemCopyUnitToMetadata' on 2025-12-21T07:31:23.889066739+01:00[Europe/Berlin]. Use '--force' to execute it again.
[main] INFO org.openhab.core.tools.UpgradeTool - Already executed 'linkUpgradeJSProfile' on 2025-12-21T07:31:24.388885398+01:00[Europe/Berlin]. Use '--force' to execute it again.
[main] INFO org.openhab.core.tools.UpgradeTool - Already executed 'linkUpgradeScriptProfile' on 2025-12-21T07:31:26.823674703+01:00[Europe/Berlin]. Use '--force' to execute it again.
[main] INFO org.openhab.core.tools.UpgradeTool - Already executed 'yamlTagsListToMap' on 2025-12-21T07:31:29.368899653+01:00[Europe/Berlin]. Use '--force' to execute it again.
[main] INFO org.openhab.core.tools.UpgradeTool - Already executed 'homeAssistantAddonUpgrader' on 2025-12-21T07:31:29.378853384+01:00[Europe/Berlin]. Use '--force' to execute it again.
[main] INFO org.openhab.core.tools.UpgradeTool - Already executed 'homieAddonUpgrader' on 2025-12-21T07:31:29.389967796+01:00[Europe/Berlin]. Use '--force' to execute it again.
[main] INFO org.openhab.core.tools.UpgradeTool - Already executed 'persistenceCopyDefaultStrategy' on 2025-12-21T07:31:29.422509375+01:00[Europe/Berlin]. Use '--force' to execute it again.
[openHAB] JSON Database upgrade completed.

The option --force mentioned in the output refers to the update tool, not to dpkg-reconfigure.

As s user, my expectation would be that

  • either the upgrade tool is always run with the option --force on dpg-reconfigure
  • or the upgrade tool is run with option --force when dpg-reconfigure --force is called (yes, --force is also a valid option for dpgk-reconfigure)

Without this options at hand, you need to run the upgrade tool manually (java -jar ...), whenever you need to force it.

(This bug report is somehow related to the changes we did to the persistence upgrade tool, which had been run on an older snapshot and needed to re-run with the latest RC.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the dpkg-reconfigure package script and the invocation of the JSON Database upgrade tool. Check how dpkg-reconfigure arguments are handled, then verify that the requested force behavior is passed through and that normal reconfiguration remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, shell
Domain
cli, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.