Detecting user installed pkgs

Thanks for that.

The following is not a reply to you but is more information relating to x86 targets.
I replied to keep it tied to the thread of consciousness. :slight_smile:

I did a bit of analysis and it looks like the x86 builds may be
too generalized to get the device specific package list in the
one case of target x86/geode.
The script could map to generic in all x86 cases and provide
a note about manual intervention for the x86/geode case.

With the possibility of more changes in the snapshot ecosystem,
I'm inclined to not do a lot of work to customize the script for it.

Some info from my analysis:

On https://downloads.openwrt.org/snapshots/targets/

There are 4 sub-directories for x86 which would be nice if they match
the json $.release.target value from ubus call system board
so the script can build a functional URL.
x86/64/
x86/generic/
x86/geode/
x86/legacy/

To get the device specific package list with jsonfilter of the profiles.json file,
the system board value with json key $.board_name should match
one of the keys under json path $.profiles[*]

https://downloads.openwrt.org/snapshots/targets/x86/64/profiles.json has 32 default packages listed and has $profiles[*] genericwith 12 device specific packages listed and nothing else from yourubuscall example that seems to align but the script could do a static mapping togeneric`.

https://downloads.openwrt.org/snapshots/targets/x86/generic/profiles.json has 32 default packages listed and has $profiles[*] genericwith 12 device specific packages listed but the script could do a static mapping togeneric`.

https://downloads.openwrt.org/snapshots/targets/x86/geode/profiles.json has 32 default packages listed and has $profiles[*] generic geos`

profile generic has 4 device specific packages listed
profile geos has 16 device specific packages listed
I do not know how the user or installer chooses the package list.

https://downloads.openwrt.org/snapshots/targets/x86/legacy/profiles.json has 32 default packages listed and has $profiles[*] genericwith 13 device specific packages listed but the script could do a static mapping togeneric`.

Looking at profiles.json file data for non-x86 targets under
https://downloads.openwrt.org/snapshots/targets/
it looks like the "normal" names are used so the script should work fine.

Looking at profiles.json file data for x86 targets under
non-snapsot versions, it looks like the same situation
as the snapshots versions, so the issue is not with
snapshots and it is with x86. At least there are only 4
profiles.json files to possibly manually get data from
and only one has more than one device profile to use.

That's it for now.

1 Like

Thanks for reviving this thread - I've tagged the post that I think has the right solution in it. There may be a minor issue where luci-ssl was flagged as a user installed package -- but the comment that you have to combine the manifest + the package.json board specifics is correct... if I manually create that file it works fine. (so maybe there are still some minor bugs here -- but this gets you close enough to identifying the user installed packages AFTER an "Attended Sysupgrade" has run..

Thanks.

It is my understanding that luci and luci-ssl are not "default" or "standard" packages and are considered optional. They are only included in stable builds (and release candidates), and only for convenience if I remember posts by one or more developers. As far as I know, neither is included in any other builds or the image-builder.

Luci is a dependency of luci-ssl so that explains luci-ssl being listed as user-installed.

The lack of luci in many builds generates a lot of questions on the forum, that's for sure. It is definitely expected by many people not yet familiar.

I did testing with dual processes, one that uses just the data in the profiles.json file and one that combines the device specific packages from the profiles.json file with the packages.manifest file. That did reveal a bug where some packages were incorrectly listed as user installed when a grep matched a hyphenated name. I lost my notes on that soI'll have to go back and reproduce that and fix the script in post 8.

So, in summary, the json-only input matches image-builder builds and the manifest + device packages list from the json file matches the pre-built "release" images.

The only difference I have seen is the luci-ssl package as expected.

I hope all this helps some people.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.