Bug 9557

Summary: opkg fails to parse some feeds whose Packages file was created with a 3rd party tool
Product: [Yocto Project Subprojects] opkg Reporter: Josh Prewitt <joshua.prewitt>
Component: opkgAssignee: Alejandro del Castillo <alejandro.delcastillo>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided    
Version: unspecified   
Target Milestone: 0.3.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
Packages none

Description Josh Prewitt 2016-04-29 01:25:55 UTC

    
Comment 1 Josh Prewitt 2016-04-29 01:27:22 UTC
This is problematic since some package feed creation tools sort the package attributes alphabetically.
Comment 2 Alejandro del Castillo 2016-05-05 21:39:21 UTC
could you provide an example of a problematic Packages file? I tested by switching lines in a Packages file and everything worked fine.

adelcast@delcastillo2 ~/git/opkg $ cat /tmp/opk/Packages 
Version: 3.0
Filename: a_3.0_all.opk
Architecture: all
Package: a
MD5Sum: a40a7862dd0829156eabeddcea969cd4

adelcast@delcastillo2 ~/git/opkg $ opkg -o /tmp/opkg update
Downloading file:/tmp/opk/Packages.
Updated source 'test'.
adelcast@delcastillo2 ~/git/opkg $ opkg -o /tmp/opkg install a
Installing a (3.0) on root.

By looking at pkg_parse.c, ordering is not being restricted.
Comment 3 Josh Prewitt 2016-05-11 19:04:56 UTC
Created attachment 3174 [details]
Packages

Attaches is the Packages file that I created with a 3rd party tool and was having problems with.
Comment 4 Alejandro del Castillo 2016-05-23 15:03:01 UTC
Fixed on commits:

a1cbabe3dbeb731622a157b78fd3e8ca924e74fc
bc9b7496822e02fe984ab0e3bf2fca4b150d9fbe