From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1ROsJj-0003a3-P0 for garchives@archives.gentoo.org; Fri, 11 Nov 2011 14:42:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 02FB921C0EB; Fri, 11 Nov 2011 14:38:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9F95B21C0EB for ; Fri, 11 Nov 2011 14:38:31 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E917D1B4039 for ; Fri, 11 Nov 2011 14:38:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 61E9980037 for ; Fri, 11 Nov 2011 14:38:30 +0000 (UTC) From: "Kent Fredric" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kent Fredric" Message-ID: Subject: [gentoo-commits] proj/perl-overlay:master commit in: scripts/ X-VCS-Repository: proj/perl-overlay X-VCS-Files: scripts/fixvdep.pl X-VCS-Directories: scripts/ X-VCS-Committer: kent X-VCS-Committer-Name: Kent Fredric X-VCS-Revision: b9d63a5efdae891f3ab20d19e908f6f816d78a81 Date: Fri, 11 Nov 2011 14:38:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 91cdfd9b-7c2b-4b71-8963-d914eda017f1 X-Archives-Hash: 49ab19c3700e5c2d882839fea39aaed7 commit: b9d63a5efdae891f3ab20d19e908f6f816d78a81 Author: Kent Fredric gmail com> AuthorDate: Fri Nov 11 14:37:23 2011 +0000 Commit: Kent Fredric gmail com> CommitDate: Fri Nov 11 14:37:23 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/perl-overlay.= git;a=3Dcommit;h=3Db9d63a5e [scripts] added fixvdep for easy version subs --- scripts/fixvdep.pl | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/scripts/fixvdep.pl b/scripts/fixvdep.pl new file mode 100644 index 0000000..3a77406 --- /dev/null +++ b/scripts/fixvdep.pl @@ -0,0 +1,38 @@ +#!/usr/bin/env perl=20 + +use strict; +use warnings; +# FILENAME: fixvdep.pl +# CREATED: 12/11/11 00:52:15 by Kent Fredric (kentnl) +# ABSTRACT: Fix up version deps on a specific package in (a) given ebuil= d(s) + + +my ( $pkg, $oldversion , $newversion , @files ) =3D @ARGV; +@ARGV =3D (); + + +my @subs =3D (=20 + =20 + ( sprintf 's/%s-%s\s*$/%s-%s/' , $pkg, $oldversion,$pkg,$newversion ), + ( sprintf 's/%s-%s\s*"/%s-%s"/' , $pkg, $oldversion,$pkg,$newversion )= , + + ( sprintf 's/%s\s*%s\s*$/%s %s/', $pkg, $oldversion, $pkg, $newversion= ), + ( sprintf 's/%s\s*%s\s*#\s*%s\s*$/%s %s/',=20 + $pkg, $oldversion, $newversion, $pkg, $newversion ), + ( sprintf 's/%s-%s\s*\$\(comment\s*%s\)\s*$/%s-%s/', $pkg, $oldversion= , $newversion, $pkg, $newversion ), + + + + + +); + +for my $sub ( @subs ) { + print "$sub\n"; + system('sed','-i', '-r', '-e', $sub , @files ); +} + + + + +