FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 09-30-2012, 09:44 PM
Gilles Dartiguelongue
 
Default About disabling DISABLE_DEPRECATED

Hi all,

as discussed this morning on #-desktop, I found out while reading
commits from April that we have quite a few ebuilds in tree doing this
manually.

The problem is that in those ~153 instances of the same command, some do
take care of problems such as i18n env, some don't, some delete whole
lines, some replace with $(NULL) or even other values.

I think it is high time we provide a reference solution for this, even
if the solution should be to push upstream to fix there build system as
usual.

You'll find in attachement a prototype patch from gnome2-utils eclass.

It does not take care of packages providing
--disable-deprecations{,-flags} on purpose for now since I have not
found a MACRO and hence a reliable way to make sure this works in
upstream tarballs. Some packages do have such configure switch but it
does not always work.

--
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo
 
Old 10-03-2012, 02:57 AM
Mike Frysinger
 
Default About disabling DISABLE_DEPRECATED

On Sunday 30 September 2012 17:44:05 Gilles Dartiguelongue wrote:
> +# @USAGE: gnome2_disable_deprecation_warning

no need for this

> + for makefile in $(find "${S}" -name "Makefile.in"
> + -o -name "Makefile.am" -o -name "Makefile.decl" | sort); do

`local makefile` missing. also, this does not preserve quoting. you would
have to do:
while read makefile ; do
...
done < <(find ...)

> + if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then

`grep -E` -> `egrep`

> + LC_ALL=C sed -e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g'
> + -e 's:-DGSEAL_ENABLE:$(NULL):g'
> + -i "${makefile}"

use -r instead of escaping. it's also more readable to split -e from the rest
since that tends to be the meat of sed.
LC_ALL=C sed -i -r
-e '...'
-e '...'
"${makefile}"

> + fails[$(( ${#fails[@]} + 1 ))]="${makefile}"

fails+=( "${makefile}" )

> + eerror "Failed to disable deprecation warnings in $makefile"

${makefile}

also, if you're using eerror, this really should end in a `die`. or it should
use ewarn.
-mike
 
Old 10-08-2012, 03:37 AM
Arfrever Frehtes Taifersar Arahesis
 
Default About disabling DISABLE_DEPRECATED

2012-10-03 04:57:10 Mike Frysinger napisaƂ(a):
> On Sunday 30 September 2012 17:44:05 Gilles Dartiguelongue wrote:
> > + if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then
>
> `grep -E` -> `egrep`

'man grep' says:
"egrep is the same as grep -E. fgrep is the same as grep -F. Direct invocation as either egrep or fgrep is deprecated,
but is provided to allow historical applications that rely on them to run unmodified."

--
Arfrever Frehtes Taifersar Arahesis
 

Thread Tools




All times are GMT. The time now is 07:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org