Ticket #988 (closed defect: fixed)

Opened 2 years ago

Last modified 7 weeks ago

Problem with upgrade of opkg

Reported by: elhennig Owned by: spaetz
Priority: major Milestone:
Component: upstream Version: SHR-testing
Keywords: Cc:

Description (last modified by spaetz) (diff)

The upgrade of the opkg package breaks the file /usr/lib/opkg/status which is not correctly written to the end and produces errors with further opkg actions.

Change History

comment:1 Changed 2 years ago by elhennig

THe problem is there for every package upgrade: The status file is incompletely written and has a size of 229376 after the "opkg upgrade" process.

Debug output og opkg does not reveal errors, the process quits with segfault.

comment:2 Changed 2 years ago by elhennig

"opkg remove" works while "opkg install" and "opkg upgrade" cause the problem

comment:3 Changed 2 years ago by mossroy

I face the same issue after upgrading my SHR-testing.
My status file has a size of 184320 and looks truncated as it ends with :

Package: util-linux-ng-fdisk
Version: 2.16-r9.4.4          
Depends: libgcc1 (>= 4.4.3), libc6 (>= 2.11)
Provides: util-linux-fdisk
Status: install user installed
Architecture: armv4t          
Installed-Time: 1268168507                                                   
                                          
Package: kernel-module-omni

An opkg update or upgrade ends up with this error :
Collected errors:

  • pkg_parse_from_stream_nomalloc: Missing new line character at end of file!
  • pkg_hash_add_from_file: Package kernel-module-omni version (null) has no valid architecture, ignoring.

I'm afraid our filesystem has been corrupted and we need to reinstall it...

comment:4 follow-up: ↓ 5 Changed 2 years ago by elhennig

I fixed this for my FR by doing a fresh install, but of course this should not be the default way of fixing problems.

comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 2 years ago by hafting

Replying to elhennig:

I fixed this for my FR by doing a fresh install, but of course this should not be the default way of fixing problems.

A simpler temporary fix is to download the .tar.gz file for shr-lite to a pc, and unpack it. Then, copy the older opkg binary from the pc to the phone.

comment:6 in reply to: ↑ 5 Changed 2 years ago by elhennig

Replying to hafting:

A simpler temporary fix is to download the .tar.gz file for shr-lite to a pc, and
unpack it. Then, copy the older opkg binary from the pc to the phone.

And then I have only updated the version number of opkg and the problem might pop up again with the next upgrade...

comment:7 Changed 2 years ago by spaetz

  • Version changed from SHR-unstable to SHR-testing
  • Description modified (diff)

This is pretty bad as it shows that opkg is still mangling its status file. without keeping any backups. I say outch, but besides someone fixing opkg, I don't see what we can do here....

comment:8 Changed 2 years ago by spaetz

  • Description modified (diff)

Leaving this open as a reminder to bump opkg as soon as new revisions become available.

comment:9 Changed 23 months ago by Heinervdm

  • Milestone set to MS1

comment:10 Changed 21 months ago by Heinervdm

  • Owner changed from spaetz to mrmoku
  • Component changed from Feed packages to upstream

comment:11 Changed 21 months ago by Heinervdm

  • Owner changed from mrmoku to spaetz
  • Status changed from new to assigned

comment:12 Changed 19 months ago by dos

  • Status changed from assigned to closed
  • Resolution set to fixed

opkg is quite recent ATM and I haven't noticed such behaviour any more. If it's still happening, please reopen.

comment:13 Changed 7 weeks ago by morphis

  • Milestone MS1 deleted

Milestone MS1 deleted

Note: See TracTickets for help on using tickets.