Sometimes the same packages are included in different feeds. They may or may not have the same version. How do I control which one is used for the final build?
Can you provide an example?
Might has well post your feeds.conf.default/feeds.conf
as well.
Sure. Please see below the content from feeds.conf.default. The feeds luci and small8 has multiple duplicated packages. How do I choose and pick which feeds to use for certain packages?
src-git packages https://github.com/Lienol/openwrt-packages.git;21.02
src-git luci https://github.com/Lienol/openwrt-luci.git;21.02
src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02
src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02
src-git lienol https://github.com/Lienol/openwrt-package.git;main
src-git small8 https://github.com/kenzok8/small-package
~
You realize that the last two of those have nothing to do with OpenWrt?
Yes, but it should be appropriate for this forum based on forum description?
Ask questions about building OpenWrt firmware. Ask for advice about adding a new device to OpenWrt, getting help compiling OpenWrt, using ImageBuilder, or creating custom configurations.
Right off the bat, I suspect you are running a fork of OpenWrt and not true OpenWrt.
The only OpenWrt feeds you point to are these, neither are problematic to your question:
src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02
src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02
The other feeds. well we have no idea as to their contents.
It appears you are using firmware that is not from the official OpenWrt project.
When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.
You may find that the best options are:
- Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
- Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
- Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).
If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.
Not really.
It's quite simple, opkg is rather stupid, there mustn't be duplicated packages in different feeds. As far as OpenWrt's feeds (openwrt_{core,base,luci,packages,routing,telephony}
) are concerned, that should be a given (everything else would be a bug to be reported here), but we have no influence about custom feeds maintained elsewhere - that would be something to discuss with their respective owners.
Thank you for your comments. This question is about how the build system works.
There are many packages that are not in Official OpenWRT and people need to be able to work with them and solve the problems associated with that. It will not be uncommon for people to include two or more third party feeds in the feed.conf.
The problem can certainly happen when someone tries to put together feeds from various sources and try to make it work for whatever purpose. It is unrealistic to assume people will only need to use official OpenWRT packages.
Now I got the point that the existing build system cannot handle duplicated packages. This behavior is not unique to third party fork. The official system would behave the same.
Thanks.
Max
The official feeds have no duplicated packages, that’s the point the posters above are making.
The official feeds are curated, dupes won’t occur
Duplicate packages among feeds are undefined behavior when linked concurrently into the buildroot.
To control which feed source is preferred when calling ./scripts/feeds install somepkg
supply the -p
flag, e.g.: ./scripts/feeds -p otherfeed install duplicatepkg