How do I retrieve all package lists for a specific device?

I'm scripting something to make my life easier, but I ran into a problem. It needs to work like this:

myscript $url_openwrt_image package1 package2 package3

How do I retrieve all package lists for a specific device ?

Specifically how do I translate from:
https://downloads.openwrt.org/releases/22.03.0/targets/ath79/generic/openwrt-22.03.0-ath79-generic-tplink_archer-a7-v5-squashfs-sysupgrade.bin
to:
https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/

Thanks in advance

grab the Packages.gz's listed when you do opkg update ?

1 Like

Is there a simple way to retrieve the "package architecture" ?

EDIT:

Isn't it amazing that after you understand the question, you understand the answer :blush:

@frollic exactly what i needed, thanks

I had the assumption packages were unique in the Packges file.
However I found there is some sort of an overlap:

$ grep -h "Filename: " *|sort |wc -l
10339
$ grep -h "Filename: " *|sort -u |wc -l
9451

Is this on purpose ?