openhab / openhab/openhab-linuxpkg
dpkg-reconfigure does not re-run the upgrade tool
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
--forceondpg-reconfigure - or the upgrade tool is run with option
--forcewhendpg-reconfigure --forceis called (yes,--forceis also a valid option fordpgk-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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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