[OE-core] [PATCH 3/5] logrotate: files will be over written when updating using rpm

Liu Jian jian.liu at windriver.com
Thu Nov 20 02:11:13 UTC 2014


于 2014年11月20日 01:54, Dan McGregor 写道:
> On 14 November 2014 03:43, Jian Liu <jian.liu at windriver.com> wrote:
>> If there is no %config micro before the file in the spec file,
>> this file will be over-written after updating this package
>> using rpm.
>> This will make our settings lost.
>>
>> Signed-off-by: Jian Liu <jian.liu at windriver.com>
>> ---
>>   meta/recipes-extended/logrotate/logrotate_3.8.7.bb | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
>> index faa8e02..8b39602 100644
>> --- a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
>> +++ b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
>> @@ -54,3 +54,5 @@ do_install(){
>>       install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
>>       touch ${D}${localstatedir}/lib/logrotate.status
>>   }
>> +
>> +CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status"
> Part of me thinks this shouldn't be an installed file at all; instead
> it should be created by a post install script if it doesn't already
> exist. Thoughts?
It does be contained in rpm package and generated during installation 
though it is empty.
It is not created when logrotate is running.
I test it on our WRL6.0 and WRL7.0

So if you update logrotate, logrotate.status will be overwritten during 
installation.
All previous status may be lost.

//Liu Jian
>
>> --
>> 1.8.5.2.233.g932f7e4
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

-- 
Jian Liu
Email: jian.liu at windriver.com
Office Phone: 86-10-84778539

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20141120/4883a83c/attachment-0002.html>


More information about the Openembedded-core mailing list