Bug 15160 - opkg build throws deprecation warnings about several cURL options with libcurl 7.88
Summary: opkg build throws deprecation warnings about several cURL options with libcur...
Status: ACCEPTED
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.6.1
Hardware: x86 Multiple
: Undecided normal
Target Milestone: next-patch
Assignee: Alex Stewart
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-07-13 15:22 UTC by Alex Stewart
Modified: 2023-07-13 15:24 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Stewart 2023-07-13 15:22:39 UTC
When building opkg with a libcurl version of 7.88 (or presumably back to 7.55), make will thrown deprecation warnings for several cURL options being used by `opkg_download_curl.c`.


```GNU make
  CC       opkg_download_curl.lo
opkg_download_curl.c: In function 'opkg_validate_cached_file':
opkg_download_curl.c:237:5: warning: 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' is deprecated: since 7.55.0. Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T [-Wdeprecated-declarations]
  237 |     curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &src_size);
      |     ^~~~~~~~~~~~~~~~~
In file included from opkg_download_curl.c:23:
/usr/include/x86_64-linux-gnu/curl/curl.h:2858:3: note: declared here
 2858 |   CURLINFO_CONTENT_LENGTH_DOWNLOAD
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
opkg_download_curl.c: In function 'opkg_curl_init':
opkg_download_curl.c:455:9: warning: 'CURLOPT_PROGRESSFUNCTION' is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations]
  455 |         setopt(CURLOPT_PROGRESSFUNCTION, cb);
      |         ^~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:1295:3: note: declared here
 1295 |   CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
      |   ^~~~~~~~~~~~~~~~~
```


These warnings will presumably become an error one day. We should consider replacing the old cURL options with the new options being recommended in the deprecation message.