Skip to contentSkip to conversation

DEFAULT_PREFERENCE no longer used?

DISCUSSION Michael Opdenacker 2 participants 3 messages Jul 22, 2021

lore
Share & tools
lore
#0 lore raw

Greetings,

Looking at the code, it seems that the DEFAULT_PREFERENCE variable is no longer in use. Unless I missed something, the variable is still read, but not taken into account any more, and there are just two recipes that set it.

The BitBake documentation still refers to it though.

May I propose documentation and code patches to remove it for good?

Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#1 lore raw
Quoted 10 lines · Michael Opdenacker

Greetings,

Looking at the code, it seems that the DEFAULT_PREFERENCE variable is no longer in use. Unless I missed something, the variable is still read, but not taken into account any more, and there are just two recipes that set it.

The BitBake documentation still refers to it though.

May I propose documentation and code patches to remove it for good?

I think it is still used:

lib/bb/cache.py:        self.defaultpref = self.intvar('DEFAULT_PREFERENCE', metadata)
lib/bb/cache.py:        cachedata.pkg_dp[fn] = self.defaultpref
lib/bb/providers.py:        preference = dataCache.pkg_dp[f]

[in sortPriorities()]

Cheers,

Richard

#2 lore raw

Hi Richard,

Quoted 8 lines · Richard Purdie
Quoted 7 lines · Michael Opdenacker

Greetings,

Looking at the code, it seems that the DEFAULT_PREFERENCE variable is no longer in use. Unless I missed something, the variable is still read, but not taken into account any more, and there are just two recipes that set it.

Quoted 8 lines
Quoted 3 lines

The BitBake documentation still refers to it though.

May I propose documentation and code patches to remove it for good?

I think it is still used:

lib/bb/cache.py:        self.defaultpref = self.intvar('DEFAULT_PREFERENCE', metadata)
lib/bb/cache.py:        cachedata.pkg_dp[fn] = self.defaultpref
lib/bb/providers.py:        preference = dataCache.pkg_dp[f]

Oops, I read too quickly then, overlooking the second line. Thanks for proving me wrong :)

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com