pkg_extract_data_file_names_to_stream: Failed to extract data.tar.gz from package

57 views
Skip to first unread message

Bryan Evenson

unread,
Oct 4, 2021, 2:38:43 PM10/4/21
to opkg-devel
All,

I have an AT91SAM9G25 based system that has an image that is back at yocto-2.2 (morty).  I'm working on upgrading the build tools to a supported Yocto release.  Everything has been working for me through the yocto-2.5 release (sumo).  I then started seeing this error when upgrading my current image to a package feed built under the yocto-2.6 release (thud):

 * pkg_extract_data_file_names_to_stream: Failed to extract data.tar.gz from package '/usr/share/opkg/cache/8e34d9a5f68aed9d0a3e126174b2d365_shadow-securetty_4.6-r3.3_at91sam9x5ek.ipk'.
 * pkg_get_installed_files: Error extracting file list from /usr/share/opkg/cache/8e34d9a5f68aed9d0a3e126174b2d365_shadow-securetty_4.6-r3.3_at91sam9x5ek.ipk.

I am getting this same error message for every package that I am trying to upgrade and all the upgrades fail.  I have continued to test with different Yocto releases, and I am still seeing this problem for every release I've tested past yocto-2.6.  So far I'm up to yocto-3.1 (dunfell).

I don't see any notes regarding any changes in opkg or the ipk creation that would cause this problem.  Does anyone have any ideas on what may be going wrong for me?

Thanks,
Bryan

Alex Stewart

unread,
Oct 4, 2021, 5:01:26 PM10/4/21
to opkg-...@googlegroups.com, Bryan Evenson
Hey Bryan,

On 10/4/21 1:38 PM, Bryan Evenson wrote:
> All,
>
> I have an AT91SAM9G25 based system that has an image that is back at
> yocto-2.2 (morty).  I'm working on upgrading the build tools to a
> supported Yocto release.  Everything has been working for me through
> the yocto-2.5 release (sumo).  I then started seeing this error when
> upgrading my current image to a package feed built under the yocto-2.6
> release (thud):
>
>  * pkg_extract_data_file_names_to_stream: Failed to extract
> data.tar.gz from package
> '/usr/share/opkg/cache/8e34d9a5f68aed9d0a3e126174b2d365_shadow-securetty_4.6-r3.3_at91sam9x5ek.ipk'.
>  * pkg_get_installed_files: Error extracting file list from
> /usr/share/opkg/cache/8e34d9a5f68aed9d0a3e126174b2d365_shadow-securetty_4.6-r3.3_at91sam9x5ek.ipk.

Your description makes me think that the data segments of your new
(thud) IPKs are using a type of compression which is unsupported by the
older version of opkg on your Atmel system.

If you're using the yocto/morty opkg binary, that seems to be back at
v0.3.3 - which was before we added support for XZ- and bzip2-compression
[1]. XZ subsequently became the default for yocto/sumo and beyond [2].

Though, in that case I would have expected your sumo IPKs to also fail
to upgrade.

In any case, you can check the data segments compression trivially by
opening the IPK (`ar -x foo.ipk`) and checking the file extension on the
`data.tar.*` file.

Hope that helps,

--
Alex Stewart
Software Engineer - NI Real-Time OS
NI (National Instruments)

alex.s...@ni.com

Bryan Evenson

unread,
Oct 5, 2021, 10:10:09 AM10/5/21
to Alex Stewart, opkg-devel
Alex,

Yes, this appears to be the problem.  I've confirmed that the builds that do not upgrade have "data.tar.xz" in the ipk instead of "data.tar.gz".  I added:

OPKGBUILDCMD = "opkg-build -Z gzip"

to my local.conf and now the ipks are compressed with gzip again.

Thanks,
Bryan
Reply all
Reply to author
Forward
0 new messages