[OpenWrt-Devel] [PATCH 3/3] treewide: rename DEVICE_TYPE to DEFAULT_TYPE
mail at adrianschmutzler.de
mail at adrianschmutzler.de
Fri May 29 16:05:58 EDT 2020
> > The prefix "DEVICE_" for Make variables is only used for per-device
> > variables with the only exception of DEVICE_TYPE. This is misleading
> > as it leads people to incorrectly assume it can be set per device like
> > all the other DEVICE_* variables, as has been observed in the past.
> >
> > This renames this (rarely used) variable to clearly indicate that
> > it's not a device-dependent variable, and stays in line with the
> > DEFAULT_PACKAGES variable.
> >
> > Note that there is also a (single) package in the packages feed that
> > needs to be updated.
> >
> > Cc: Linus Walleij <linus.walleij at linaro.org>
> > Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> > ---
> Default type of what? IMO "DEFAULT_TYPE" is significantly worse than
> "DEVICE_TYPE": "DEVICE_TYPE" may be slightly misleading, but at least it's
> somehow conveying the information that we're talking about types of
> devices. The part "DEFAULT" is also misleading in a different way, as I
> would expect to be able to override a default value (for example in a
> device definiton).
> The variable is used rarely enough that we could well make this a bit more
> verbose. "TARGET_DEVICE_TYPE"? If it weren't for the busybox config change
TARGET_DEVICE_TYPE also was my "second-best" idea, and in contrast to our recent similar discussion I can well live with this alternative :-)
> (which seems hacky to me at best*), we could also go with something like
> TARGET_PACKAGEGROUP, as the package selection would be the only thing
> controlled by this variable...
After all, I personally think that this DEVICE_TYPE/TARGET_DEVICE_TYPE variable should be removed entirely.
What remains would be the concept of different predefined sets of DEFAULT_PACKAGES, which could be indeed solved by something like
TARGET_PACKAGEGROUP := nas
Or we just drop the variable at all, and do
DEFAULT_PACKAGES := DEFAULT_PACKAGES.basic DEFAULT_PACKAGES.router
at the beginning (!) of target.mk, so targets (effectively just 3 of them) can just overwrite it with
DEFAULT_PACKAGES := DEFAULT_PACKAGES.basic DEFAULT_PACKAGES.nas
directly in the few cases where that is necessary (I'd rather use DEFAULT_PACKAGES_BASIC etc. as names then).
The switch of busybox could then be implemented separately, which would most probably follow a simpler attempt of Linus' separate patch or something completely different ...
If I understood Linus' commit message correctly, the current solution there doesn't work properly anyway.
Personally, I'd prefer one of the latter options, with DEFAULT_PACKAGES selection separated from any config symbols.
Best
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200529/8aea5be0/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list