| Submitter | Kang Kai |
|---|---|
| Date | March 11, 2013, 3:31 a.m. |
| Message ID | <1eab6578b55eee05f36c14d1e536c793c5d80659.1362966448.git.kai.kang@windriver.com> |
| Download | mbox | patch |
| Permalink | /patch/45857/ |
| State | New |
| Headers | show |
Comments
On 11 March 2013 04:31:17 Kang Kai <kai.kang@windriver.com> wrote: > do_package_qa is added to variable PACKAGEFUNCS and run after > do_package. packaging tests should not ending up in package.bbclass. > Split do_package_qa as a new task after do_package. > > [YOCTO #3190] > > Signed-off-by: Kang Kai <kai.kang@windriver.com> > --- > meta/classes/insane.bbclass | 15 +++++++++++++-- > 1 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass > index bd6f120..d7787ac 100644 > --- a/meta/classes/insane.bbclass > +++ b/meta/classes/insane.bbclass > @@ -17,9 +17,9 @@ > # files under exec_prefix > > > -inherit package > +#inherit package > PACKAGE_DEPENDS += "${QADEPENDS}" > -PACKAGEFUNCS += " do_package_qa " > +#PACKAGEFUNCS += " do_package_qa " I'd remove those lines, they are in the history anyway. > > # unsafe-references-in-binaries requires prelink-rtld from > # prelink-native, but we don't want this DEPENDS for -native builds > @@ -654,6 +654,15 @@ def package_qa_walk(path, warnfuncs, errorfuncs, > skip, package, d): > target_os = d.getVar('TARGET_OS', True) > target_arch = d.getVar('TARGET_ARCH', True) > > + pkgfiles = {} > + packages = d.getVar('PACKAGES', True).split() > + pkgdest = d.getVar('PKGDEST', True) > + for pkg in packages: > + pkgfiles[pkg] = [] > + for walkroot, dirs, files in os.walk(pkgdest + "/" + pkg): I'd use os.sep above, too. I would ACK the patch with these changes, fwiw. Thanks, > + for file in files: > + pkgfiles[pkg].append(walkroot + os.sep + file) > + > warnings = [] > errors = [] > for path in pkgfiles[package]: > @@ -823,6 +832,8 @@ python do_package_qa () { > bb.note("DONE with PACKAGE QA") > } > > +addtask package_qa after do_package before do_build > +EXPORT_FUNCTIONS do_package_qa > > python do_qa_staging() { > bb.note("QA checking staging") > -- > 1.7.5.4 > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core Sent with AquaMail for Android http://www.aqua-mail.com
On 2013?03?11? 16:06, Bernhard Reutner-Fischer wrote: > On 11 March 2013 04:31:17 Kang Kai <kai.kang@windriver.com> wrote: >> do_package_qa is added to variable PACKAGEFUNCS and run after >> do_package. packaging tests should not ending up in package.bbclass. >> Split do_package_qa as a new task after do_package. >> >> [YOCTO #3190] >> >> Signed-off-by: Kang Kai <kai.kang@windriver.com> >> --- >> meta/classes/insane.bbclass | 15 +++++++++++++-- >> 1 files changed, 13 insertions(+), 2 deletions(-) >> >> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass >> index bd6f120..d7787ac 100644 >> --- a/meta/classes/insane.bbclass >> +++ b/meta/classes/insane.bbclass >> @@ -17,9 +17,9 @@ >> # files under exec_prefix >> >> >> -inherit package >> +#inherit package >> PACKAGE_DEPENDS += "${QADEPENDS}" >> -PACKAGEFUNCS += " do_package_qa " >> +#PACKAGEFUNCS += " do_package_qa " > > I'd remove those lines, they are in the history anyway. > >> >> # unsafe-references-in-binaries requires prelink-rtld from >> # prelink-native, but we don't want this DEPENDS for -native builds >> @@ -654,6 +654,15 @@ def package_qa_walk(path, warnfuncs, errorfuncs, >> skip, package, d): >> target_os = d.getVar('TARGET_OS', True) >> target_arch = d.getVar('TARGET_ARCH', True) >> >> + pkgfiles = {} >> + packages = d.getVar('PACKAGES', True).split() >> + pkgdest = d.getVar('PKGDEST', True) >> + for pkg in packages: >> + pkgfiles[pkg] = [] >> + for walkroot, dirs, files in os.walk(pkgdest + "/" + pkg): > Hi Bernhard, > I'd use os.sep above, too. > I would ACK the patch with these changes, fwiw. Thanks for your review, and I will update patch. Regards, Kai > Thanks, >> + for file in files: >> + pkgfiles[pkg].append(walkroot + os.sep + file) >> + >> warnings = [] >> errors = [] >> for path in pkgfiles[package]: >> @@ -823,6 +832,8 @@ python do_package_qa () { >> bb.note("DONE with PACKAGE QA") >> } >> >> +addtask package_qa after do_package before do_build >> +EXPORT_FUNCTIONS do_package_qa >> >> python do_qa_staging() { >> bb.note("QA checking staging") >> -- >> 1.7.5.4 >> >> >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > > > Sent with AquaMail for Android > http://www.aqua-mail.com > > >
Patch
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index bd6f120..d7787ac 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -17,9 +17,9 @@ # files under exec_prefix -inherit package +#inherit package PACKAGE_DEPENDS += "${QADEPENDS}" -PACKAGEFUNCS += " do_package_qa " +#PACKAGEFUNCS += " do_package_qa " # unsafe-references-in-binaries requires prelink-rtld from # prelink-native, but we don't want this DEPENDS for -native builds @@ -654,6 +654,15 @@ def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d): target_os = d.getVar('TARGET_OS', True) target_arch = d.getVar('TARGET_ARCH', True) + pkgfiles = {} + packages = d.getVar('PACKAGES', True).split() + pkgdest = d.getVar('PKGDEST', True) + for pkg in packages: + pkgfiles[pkg] = [] + for walkroot, dirs, files in os.walk(pkgdest + "/" + pkg): + for file in files: + pkgfiles[pkg].append(walkroot + os.sep + file) + warnings = [] errors = [] for path in pkgfiles[package]: @@ -823,6 +832,8 @@ python do_package_qa () { bb.note("DONE with PACKAGE QA") } +addtask package_qa after do_package before do_build +EXPORT_FUNCTIONS do_package_qa python do_qa_staging() { bb.note("QA checking staging")
do_package_qa is added to variable PACKAGEFUNCS and run after do_package. packaging tests should not ending up in package.bbclass. Split do_package_qa as a new task after do_package. [YOCTO #3190] Signed-off-by: Kang Kai <kai.kang@windriver.com> --- meta/classes/insane.bbclass | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-)