opkg info hides some field of installed packages

139 views
Skip to first unread message

Falk Werner

unread,
Nov 3, 2020, 11:14:26 AM11/3/20
to opkg-devel
Hello,

I've investigated that opkg info behaves differently when used with an ipk file or an already installed package: When used with already installed packages, some fields (e.g. Section, Description) are missing.
(Details are provided below. IPK file for testing is attached.)

It seems that this behavior is intended. I'm just curious why these fields are missing, when the package is installed. Since the control file is copied to /var/lib/opkg/info directory, the information still exists.
The fields are also missing, when they are quieried exlicitly using the --fields option.

My use case is to provide some kind of graphical frontend to opkg. I Intended to group installed packages by their section and to provide the package description to the user. Therefore, I was wondering why these fields are missing.

I don't want to change the current behavior, I just want to understand the decision.

Thanks in advance.

Kind regards
Falk Werner

> opkg --version
opkg version 0.4.0

> opkg info test_1.0.0_armhf.ipk 
Package: test
Version: 1.0.0
Status: unknown ok not-installed
Section: base
Architecture: armhf
Maintainer: "Falk Werner"
Description: missing
Installed-Size: 1

>  opkg info test                 
Package: test
Version: 1.0.0
Status: install user installed
Architecture: armhf
Installed-Size: 1
Installed-Time: 1595125812

> opkg info --fields Version,Section test
Package: test
Version: 1.0.0

> cat /var/lib/opkg/info/test.control 
Package: test
Priority: optional
Version: 1.0.0
Section:  base
Architecture: armhf
Maintainer: "Falk Werner"
Installed-Size: 1
Depends:
Description: missing

test_1.0.0_armhf.ipk

Alejandro del Castillo

unread,
Nov 4, 2020, 1:16:00 PM11/4/20
to opkg-...@googlegroups.com, Falk Werner


On 11/3/20 10:14 AM, Falk Werner wrote:
> Hello,

Hi Falk,

> I've investigated that /opkg info/ behaves differently when used with an
> ipk file or an already installed package: When used with already
> installed packages, some fields (e.g. Section, Description) are missing.
> /(Details are provided below. IPK file for testing is attached.)/
>
> It seems that this behavior is intended. I'm just curious why these
> fields are missing, when the package is installed. Since the control
> file is copied to /var/lib/opkg/info directory, the information still
> exists.
> The fields are also missing, when they are quieried exlicitly using the
> /--fields/ option.

Yep, the behavior is intended. I believe the rationale was to save
space, by only adding the most important fields to the status file.

However, there is an option to override that behavior, by adding to your
conf:

option verbose_status_file 1

I just realized this option was never documented, apologies. Will submit
a patch soon to add documentation for this option, probably will check
if there are other non documented options too....

> My use case is to provide some kind of graphical frontend to opkg. I
> Intended to group installed packages by their section and to provide the
> package description to the user. Therefore, I was wondering why these
> fields are missing.

verbose_status_file should get you going

> I don't want to change the current behavior, I just want to understand
> the decision.


[1] commit 9e965c23b1b8adfcf38059c9f32319a2dbd85f15

--
Cheers,

Alejandro

Falk Werner

unread,
Nov 5, 2020, 7:03:48 AM11/5/20
to opkg-devel
Hi Alejandro,

this option is exactly what I was looking for.
Thanks a lot!

Kind regards
Falk
Reply all
Reply to author
Forward
0 new messages