Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Jeroen Roovers <jer@g.o>
Subject: RFC: sed script redundancy
Date: Fri, 20 May 2011 17:39:22 +0200
      Hullo developers,


for a while now I've been wondering if all those sed scripts in all
those ebuilds are really effective.

To find out, I've tried a couple of angles on a sed hook that basically
dissects the sed command line provided, divides everything up into sed
scripts, files being processed and other options, and runs everything
through diff to get some meaningful QA output as to the effective use
of the sed scripts invoked.

Of course some of the time a sed script falsely seems to be ineffective,
but could be, when it uses some variable or output that varies depending
on the platform you run it on, like with the likes of $(get_libdir).

I've looked into sed's internal solutions to no avail, but something
like -i[SUFFIX] might help, since it gives you a backup file to compare
with the file that's being streamed.

The idea is to pass the result to
  | diff -u $file $file[SUFFIX]
to figure out what was changed, and what sed script changed it.

Any help?


     jer


PS: Because the outcome may depend on the platform you run the scripts
on, this probably shouldn't make it into a QA test in portage, but it
could still help developers evaluate how effective their ebuilds' and
eclasses' sed scripts are.


Replies:
Re: RFC: sed script redundancy
-- Ryan Hill
Re: RFC: sed script redundancy
-- Fabian Groffen
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Lastrite: Some unimportant/abandoned V4Lv1 packages failing to build with linux-headers-2.6.38
Next by thread:
Re: RFC: sed script redundancy
Previous by date:
Re: Council May Summary: Changes to ChangeLog handling
Next by date:
Re: RFC: sed script redundancy


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.