You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to opkg-devel
I am using opkg 0.4.2 out of the dunfell Yocto release. My understanding is that opkg supports resuming a download as long as it has been compiled to use the curl backend, which I have done. To test this, I am using the following procedure:
1. opkg install <package>
2. ctrl+c to interrupt the download
3. opkg install <package>
I can see the @stamp file getting created for my packge download in /var/cache/opkg, but when I try to resume the download (step 3), I get the following messages:
Installing <package> (1.0) on root. Removing corrupt package file /var/cache/opkg/089b638e3c707c7c1540785a8904ebef_<package>_1.0-r0.1_aarch64.ipk. Collected errors: * pkg_verify: File size mismatch: /var/cache/opkg/089b638e3c707c7c1540785a8904ebef_<package>_1.0-r0.1_aarch64.ipk is 32862208 bytes, expecting 104864534 bytes * opkg_install_pkg: Failed to download <package>. Perhaps you need to run 'opkg update'? * opkg_solver_install: Cannot install package <package>.
I have also tried using the --force-checksum option. When I use that, I get the following message:
Installing <package> (1.0) on root. Ignored /var/cache/opkg/089b638e3c707c7c1540785a8904ebef_<package>_1.0-r0.1_aarch64.ipk checksum mismatch. Collected errors: * pkg_verify: File size mismatch: /var/cache/opkg/089b638e3c707c7c1540785a8904ebef_<package>_1.0-r0.1_aarch64.ipk is 18034688 bytes, expecting 104864534 bytes * read_header: Failed to read archive header: Truncated input file (needed 104857600 bytes, only 0 available) * pkg_extract_data_file_names_to_stream: Failed to extract data file names from package '/var/cache/opkg/089b638e3c707c7c1540785a8904ebef_<package>_1.0-r0.1_aarch64.ipk'. * pkg_get_installed_files: Error extracting file list from /var/cache/opkg/089b638e3c707c7c1540785a8904ebef_<package>_1.0-r0.1_aarch64.ipk. * opkg_solver_install: Cannot install package <package>.
Can I get some direction in where I am going wrong?
Thanks,
Steve Kim
Alex Stewart
unread,
Feb 24, 2022, 4:33:58 PM2/24/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Steve Kim, opkg-...@googlegroups.com
Hey Steve,
Could you run your opkg commands with verbosity like `opkg install -V2
...`, and include the output. It would help me to understand the
sequence of operations that opkg is doing here.
Thanks,
--
Alex Stewart
Software Engineer - NI Real-Time OS
NI (National Instruments)
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to opkg-devel
Hi Alex,
Thanks for the quick response. Here is the output with running with -V2 verbosity. The package is just a 100MB ipk file. You can see from the output that I downloaded about 49MB of it, then tried to restart the download, at which point opkg errored out.
* opkg_install_pkg: Failed to download <package>. Perhaps you need to run 'opkg update'? * opkg_solver_install: Cannot install package <package>.
Alex Stewart
unread,
Feb 28, 2022, 12:33:36 PM2/28/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Steve Kim, opkg-...@googlegroups.com
Thanks for the log. I've done a little digging through the source and I
can readily see where the opkg_download_curl.c code implies that it can
"resume" a download [1].
But looking over the high-level download codepaths: it isn't clear to me
that there is a codepath that doesn't call `pkg_verify()` prior to
attempting the download; which I expect will always fail in the case of
a partially-downloaded package. I find this reference [2] particularly
likely to break your use-case; you might try commenting it out, to see
if it gets you closer to your goal.
Otherwise, it's probable that the cURL RESUME option isn't well
exercised in the opkg community, and that it has been broken for a long
time without anyone noticing. I don't see any tests which exercise it.
And the only reference I see to it is this line [3] in the NEWS
document. Is that where you learned about it?
If this is something that you're interested in working, a first step
would be to figure out how to reliably reproduce it using the test
framework. Then at least we can test the fix and save future "you"s the
hassle of it breaking again.