[PATCH opkg 0/5] Purge packages from cache when they have incorrect checksum

Baptiste Jonglez baptiste at bitsofnetworks.org
Sun Sep 13 08:48:22 EDT 2020


Hi,

Any feedback on this patch series?

It fixes this annoying bug in the imagebuilder: https://bugs.openwrt.org/index.php?do=details&task_id=2690

Since the changes are somewhat significant, I would like some exposure in
master for a few weeks/months before it can be backported to 18.06 and
19.07.

Thanks,
Baptiste

On 25-08-20, Baptiste Jonglez wrote:
> From: Baptiste Jonglez <git at bitsofnetworks.org>
> 
> The motivation of this patch series is to fix FS#2690.  Because packages
> are continuously rebuilt, the ImageBuilder ends up with old packages in
> its cache, and fails because checksums don't match with the new package
> index from the download server.
> 
> The approach to solve this problem is the following.  Before using a package
> from the cache, verify its size and checksum against the package index, and
> delete the package from the cache if they don't match.  The install process
> will then proceed to download the "fixed" package as usual.
> 
> The main patch is "download: purge cached packages that have incorrect
> checksum".  The other ones are either cleanup or refactoring to prepare
> for the main change.
> 
> Baptiste Jonglez (5):
>   download: remove compatibility with old cache naming scheme
>   libopkg: factor out checksum and size verification
>   download: factor out the logic for building cache filenames
>   download: purge cached packages that have incorrect checksum
>   opkg_verify_integrity: better logging and error conditions
> 
>  libopkg/opkg_download.c | 123 ++++++++++++++++++++++++++++++++--------
>  libopkg/opkg_download.h |   1 +
>  libopkg/opkg_install.c  |  76 +++----------------------
>  3 files changed, 108 insertions(+), 92 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20200913/10a83b1c/attachment.sig>


More information about the openwrt-devel mailing list