W dniu czw, 25.01.2018 o godzinie 20∶49 -0800, użytkownik Zac Medico
napisał:
> On 01/25/2018 01:13 AM, Michał Górny wrote:
> > Scan build log and report verbosely CMake warnings about unused
> > variables. This is a quite common problem, yet currently it is hard
> > to notice it since the warning is mixed with src_configure() output.
> > Repeat it verbosely after the install.
> > 
> > This check outputs warnings such as:
> > 
> >  * One or more CMake variables were not used by the project:
> >  *   CMAKE_USER_MAKE_RULES_OVERRIDE
> > ---
> >  bin/install-qa-check.d/90cmake-warnings | 28 ++++++++++++++++++++++++++++
> >  1 file changed, 28 insertions(+)
> >  create mode 100644 bin/install-qa-check.d/90cmake-warnings
> > 
> > diff --git a/bin/install-qa-check.d/90cmake-warnings 
> > b/bin/install-qa-check.d/90cmake-warnings
> > new file mode 100644
> > index 000000000..36a09851b
> > --- /dev/null
> > +++ b/bin/install-qa-check.d/90cmake-warnings
> > @@ -0,0 +1,28 @@
> > +# Check for CMake invalid option warnings
> > +
> > +cmake_warn_check() {
> > +   if [[ -n ${PORTAGE_LOG_FILE} && -r ${PORTAGE_LOG_FILE} ]] ; then
> > +           local cat=cat
> > +           [[ ${PORTAGE_LOG_FILE} == *.gz ]] && cat=zcat
> > +
> > +           local vars=()
> > +           while read -r l; do
> > +                   vars+=( "${l}" )
> > +           done < <( "${cat}" "${PORTAGE_LOG_FILE}" \
> > +                   | sed -n -e '/Manually-specified variables were not 
> > used by the project/,/^--/{/^    /p}' \
> > +                   | sort -u)
> 
> We should probably use LC_ALL=C sort to ensure locale independence.
> 
> Otherwise, this patch looks good.
> 

Done that and merged, thanks!

-- 
Best regards,
Michał Górny


Reply via email to