Differing package dependencies between compiling from source and using the image generator

Hi,

I've been playing around with the image generator this weekend and I noticed that there are slight differences in the resulting package selection compared to when I build the firmware from source for the same device (TP-Link Archer C7 v2) and version (LEDE v17.01.0-rc2).

The differences are:

  1. The Image Generator does not include the package iwinfo, while in the build system (i.e. compiling from source) this package is enabled by default when I select the target Archer C7 v2.

  2. For the package px5g-xxx, which is pulled in as a dependency and not explicitly selected, I end up with a different variant when I use the Image Generator (-> px5g-standalone) compared to the build system (-> px5g-mbedtls), even though the set of added/removed packages is the same (see below).

Here's what I did:
Image Generator
I downloaded the Image Generator from the 17.01.0-rc2 download location and used this command to generate the image:

make image PROFILE="archer-c7-v2" PACKAGES="curl htop iperf3 kmod-usb-net kmod-usb-net-asix-ax88179 luci-app-sqm luci-app-uhttpd luci-ssl luci-theme-material nano wpad -wpad-mini"

Build system
I simply fetched the sources with git from scratch, checked out tag v17.01.0-rc2, selected the target Archer C7 v2 in 'make menuconfig' and then manually selected the same packages (also in menuconfig):

curl htop iperf3 kmod-usb-net kmod-usb-net-asix-ax88179 luci-app-sqm luci-app-uhttpd luci-ssl luci-theme-material nano wpad

and deselected:

wpad-mini

I would expect the same selection of packages in both cases, yet I have these two differences mentioned above. Is there any particular reason for this? Is this expected?

Thanks,

Timo

The px5g-standalone is erroneous and is caused by this commit (to which I have already added negative comments after noticing that)
https://github.com/lede-project/source/commit/cc66f819b4e778732a32f08f5dc39a2554682b73

That is already discussed also in
https://bugs.lede-project.org/index.php?do=details&task_id=529&order=id&sort=desc
https://bugs.lede-project.org/index.php?do=details&task_id=512&order=id&sort=desc

Hopefully fixed before the 17.01 release

The underlying reason is that now there are two equal package "providing" px5g:
px5g-mbedtls (the intended one) and also half-deprecated px5g-standalone (that surprisingly got that PROVIDES in January 2017)

Somehow the package dependency logic in build system, image generator and also opkg produces varying selections betwwn those two "equal" packages.

(I stumbled yesterday also into that iwinfo thing. My new wrt3200acm build did not include that although it has alwayd been in my ar71xx and ipq806x builds, and I can't really find the reason. Looks like iwinfo is selected indirectly somewhere, but I did not yet figure out, excatly where.)

Ok, thanks for the info. What a coincidence I stumble over this when I use the Image Generator for the first time.

As for px5g, I guess this will get resolved at some point then. Until it is, I can work around it.

As for iwinfo, I looked into the sources and it seems that iwinfo is nowhere depended on in the default target for Archer C7 v2, but it is set as a default. include/target.mk seems to have a rule to add iwinfo to "extra packages", when wpad or wpad-mini is selected. And in tmp/.config-target.in I have the line "select DEFAULT_iwinfo" under "config TARGET_ar71xx_generic_DEVICE_archer-c7-v2" (btw. I don't see this default under the linksys_wrt3200acm target, but I also don't fully understand the magic that generates this).

Anyway, I guess opkg (in the Image Generator process) doesn't pull it in, as there is no dependency. Yet, I would have assumed the defaults for a target in Image Generator would be the same as in the build system.

FWIW, versions of some packages in 17.01-tagged trees could be different from versions in the master tree (I recently switched back to master from the 17.01 trees because master has the newer, more customizeable netdata). So while an older version of some package might have required iwinfo and it was automatically installed the newer version might have learned to live without it.

You can test it on a live build with iwinfo by trying to uninstall it. If it was installed as dependency, AFAIK opkg would complain and list the package dependent on iwinfo.

FWIW, versions of some packages in 17.01-tagged trees could be different from versions in the master tree

I did not compile from master but from the tag v17.01.0-rc2. Shouldn't the packages be the same then? What's more, I couldn't find any recent commit that touches any dependancy related to iwinfo.

Ah, sorry, missed that bit.