* [PATCH v2] log_srcrev.bbclass: add a bbclass for logging SRCREVs
@ 2013-02-26 15:04 Constantin Musca
2013-02-26 16:56 ` Otavio Salvador
0 siblings, 1 reply; 4+ messages in thread
From: Constantin Musca @ 2013-02-26 15:04 UTC (permalink / raw)
To: openembedded-core
- add a task which creates a file for each package with the following
format:
${BB_FILENAME},${SRC_URI},${SRCREV},${FROM_AUTOREV}
[YOCTO #3041]
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
---
meta/classes/log_srcrev.bbclass | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 meta/classes/log_srcrev.bbclass
diff --git a/meta/classes/log_srcrev.bbclass b/meta/classes/log_srcrev.bbclass
new file mode 100644
index 0000000..d5d0284
--- /dev/null
+++ b/meta/classes/log_srcrev.bbclass
@@ -0,0 +1,15 @@
+python do_log_srcrev () {
+ srcrev = d.getVar('SRCREV', True)
+ if srcrev:
+ bbfile = d.getVar('BB_FILENAME', True)
+ src_uri = d.getVar('SRC_URI', True)
+ from_autorev = 'yes' if d.getVar('SRCREV', False) == 'AUTOINC' else 'no'
+
+ srcrevfile = d.expand('${TMPDIR}/srcrevs/${MULTIMACH_TARGET_SYS}/${BP}-${PV}')
+ bb.utils.mkdirhier(os.path.dirname(srcrevfile))
+
+ with open(srcrevfile, 'w') as f:
+ f.write(','.join([bbfile, src_uri, srcrev, from_autorev]))
+}
+
+addtask do_log_srcrev after do_fetch
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] log_srcrev.bbclass: add a bbclass for logging SRCREVs
2013-02-26 15:04 [PATCH v2] log_srcrev.bbclass: add a bbclass for logging SRCREVs Constantin Musca
@ 2013-02-26 16:56 ` Otavio Salvador
2013-02-26 17:25 ` Saul Wold
0 siblings, 1 reply; 4+ messages in thread
From: Otavio Salvador @ 2013-02-26 16:56 UTC (permalink / raw)
To: Constantin Musca; +Cc: Patches and discussions about the oe-core layer
On Tue, Feb 26, 2013 at 12:04 PM, Constantin Musca
<constantinx.musca@intel.com> wrote:
> - add a task which creates a file for each package with the following
> format:
>
> ${BB_FILENAME},${SRC_URI},${SRCREV},${FROM_AUTOREV}
>
> [YOCTO #3041]
>
> Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
What is the use-case for this?
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] log_srcrev.bbclass: add a bbclass for logging SRCREVs
2013-02-26 16:56 ` Otavio Salvador
@ 2013-02-26 17:25 ` Saul Wold
2013-02-26 17:33 ` Otavio Salvador
0 siblings, 1 reply; 4+ messages in thread
From: Saul Wold @ 2013-02-26 17:25 UTC (permalink / raw)
To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer
On 02/26/2013 08:56 AM, Otavio Salvador wrote:
> On Tue, Feb 26, 2013 at 12:04 PM, Constantin Musca
> <constantinx.musca@intel.com> wrote:
>> - add a task which creates a file for each package with the following
>> format:
>>
>> ${BB_FILENAME},${SRC_URI},${SRCREV},${FROM_AUTOREV}
>>
>> [YOCTO #3041]
>>
>> Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
>
> What is the use-case for this?
>
I could reply with see bug #3041!
There is a need to have the actual SRCREVs from AUTOREV'ed package
version, so a build can be reproduced at a later date or so you know
what SRCREV went into a given release.
Sau!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] log_srcrev.bbclass: add a bbclass for logging SRCREVs
2013-02-26 17:25 ` Saul Wold
@ 2013-02-26 17:33 ` Otavio Salvador
0 siblings, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2013-02-26 17:33 UTC (permalink / raw)
To: Saul Wold; +Cc: Patches and discussions about the oe-core layer
On Tue, Feb 26, 2013 at 2:25 PM, Saul Wold <sgw@linux.intel.com> wrote:
> On 02/26/2013 08:56 AM, Otavio Salvador wrote:
>>
>> On Tue, Feb 26, 2013 at 12:04 PM, Constantin Musca
>> <constantinx.musca@intel.com> wrote:
>>>
>>> - add a task which creates a file for each package with the following
>>> format:
>>>
>>> ${BB_FILENAME},${SRC_URI},${SRCREV},${FROM_AUTOREV}
>>>
>>> [YOCTO #3041]
>>>
>>> Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
>>
>>
>> What is the use-case for this?
>>
> I could reply with see bug #3041!
>
> There is a need to have the actual SRCREVs from AUTOREV'ed package version,
> so a build can be reproduced at a later date or so you know what SRCREV went
> into a given release.
I know I could read the bug but this ought to be in commit log. It
seems like a buildhistory thing from my POV, not another class thingy.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-26 17:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-26 15:04 [PATCH v2] log_srcrev.bbclass: add a bbclass for logging SRCREVs Constantin Musca
2013-02-26 16:56 ` Otavio Salvador
2013-02-26 17:25 ` Saul Wold
2013-02-26 17:33 ` Otavio Salvador
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.