Skip to content

feat: restore extra packages#1556

Merged
Tbaile merged 2 commits intomainfrom
restore_packages
Mar 10, 2026
Merged

feat: restore extra packages#1556
Tbaile merged 2 commits intomainfrom
restore_packages

Conversation

@gsanchietti
Copy link
Member

After an image upgrade, try to restore extra installed packages

Implementation details:

  • add a new binary and uci default only inside the image
  • start a task in background that tries to reinstall previously installed packages: the script logs what it does and terminates after 5 minutes if the WAN was not ready

After an image upgrade, try to restore extra installed packages
@gsanchietti gsanchietti self-assigned this Mar 5, 2026
@gsanchietti gsanchietti changed the base branch from main to release-8.7.2 March 6, 2026 13:31
Base automatically changed from release-8.7.2 to main March 6, 2026 15:56
@Tbaile Tbaile marked this pull request as ready for review March 10, 2026 11:11
@Tbaile
Copy link
Collaborator

Tbaile commented Mar 10, 2026

On the contrary of what we expected, seems that opkg successfully removes the uninstalled packages, I've tried:

root@NSEC-DEV:~# sysupgrade -k -b - | tar -O -z -x -f - etc/backup/installed_packages.txt | awk -e '/\s(overlay|unknown)$/{print $1}'
root@NSEC-DEV:~# opkg install etherwake
Installing etherwake (1.09-r5) to root...
Downloading https://updates.nethsecurity.nethserver.org/dev/8.7.2-dev+20d7224b5.20260310100353/packages/x86_64/packages/etherwake_1.09-r5_x86_64.ipk
Configuring etherwake.
root@NSEC-DEV:~# sysupgrade -k -b - | tar -O -z -x -f - etc/backup/installed_packages.txt | awk -e '/\s(overlay|unknown)$/{print $1}'
etherwake
root@NSEC-DEV:~# opkg remove etherwake
Removing package etherwake from root...
root@NSEC-DEV:~# sysupgrade -k -b - | tar -O -z -x -f - etc/backup/installed_packages.txt | awk -e '/\s(overlay|unknown)$/{print $1}'
root@NSEC-DEV:~#

Green lightning this PR, will try myself.

Source of the command: https://openwrt.org/docs/guide-user/installation/sysupgrade.packages#sysupgrade

@Tbaile Tbaile self-assigned this Mar 10, 2026
@Tbaile Tbaile merged commit a60fd84 into main Mar 10, 2026
2 checks passed
@Tbaile Tbaile deleted the restore_packages branch March 10, 2026 11:13
@Tbaile Tbaile linked an issue Mar 10, 2026 that may be closed by this pull request
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenWRT update 24.10.5

2 participants