Skip to content

Commit

Permalink
CI: Add --autoremove, ignore removal errors
Browse files Browse the repository at this point in the history
836b4e1 added
--force-removal-of-dependent-packages but it does not do what the commit
message says it does.

When package A depends on package B (package B is a dependency of
package A; package A is a dependent of package B), trying to remove
package B while package A is installed will result in an error. Adding
--force-removal-of-dependent-packages in this case will cause the
removal of package B and package A (package B's dependent).

But in the case of the CI testing step, it is package A that is being
installed and removed. Removing package A with
--force-removal-of-dependent-packages will not cause package B (package
A's dependency) to be removed.

This adds --autoremove to actually remove the package's dependencies.

This also ignores any errors returned by opkg remove as --autoremove can
sometimes falsely return an error[1].

[1]: openwrt/openwrt#12241

Fixes: 836b4e1 ("github-ci: add --force-removal-of-dependent-packages")
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
  • Loading branch information
jefferyto authored and PolynomialDivision committed Jun 12, 2023
1 parent 0c869d6 commit 9ec545c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ for PKG in /ci/*.ipk; do
echo "No test.sh script available"
fi

opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove
opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove --autoremove || true
done

0 comments on commit 9ec545c

Please sign in to comment.