[LEDE-DEV] replacing files in base system from a package?

Zefir Kurtisi zefir.kurtisi at neratec.com
Fri Dec 2 05:18:48 PST 2016


On 12/01/2016 10:29 PM, Rafał Miłecki wrote:
> On 1 December 2016 at 12:48, Zefir Kurtisi <zefir.kurtisi at neratec.com> wrote:
>> On 12/01/2016 08:28 AM, Rafał Miłecki wrote:
>>> So you still may end up with base-files installed and /etc/banner
>>> being different. If you re-install that package, e.g.
>>> opkg install base-files*.ipk
>>> you'll get banner changed to package's version.
>>>
>> From how I understand the scripts ('prepare_rootfs' is called before packages are
>> installed), a <buildroot dir>/files/etc/banner initially copied into the rootfs
>> would be overwritten with base-files/files/etc/banner when base-files*.ipk is
>> installed at the image install step. With that, <buildroot dir>/files/etc/banner
>> should never make it into a firmware image.
>>
>> (This is from looking at the include files only, did not test, could be wrong.)
> 
> I was testing it multiple times, <buildroot dir>/files/etc/banner
> overwrites one from base-files.
> 
You're right. 'prepare_rootfs' is called from image.mk/target-dir-%: _after_
packages have been installed. Which makes /etc/banner overwritten in case you
re-install base-files*.pkg on target.

Then it would be a good idea to at least warn about the potential inconsistency
during build. Or maybe remove copying of $(TOPDIR)/files completely, since the
overlay mechanism is sufficient for any use-case.




More information about the Lede-dev mailing list