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 1RH08e-0007tF-Jh for garchives@archives.gentoo.org; Thu, 20 Oct 2011 21:26:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B53EE050F; Thu, 20 Oct 2011 21:26:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 336B9E050F for ; Thu, 20 Oct 2011 21:26:48 +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 A60AF1B4009 for ; Thu, 20 Oct 2011 21:26:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1BD7180042 for ; Thu, 20 Oct 2011 21:26:47 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <8dfd8582e31a17c3adda9cba0f41545620289e5a.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/utilities.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 8dfd8582e31a17c3adda9cba0f41545620289e5a Date: Thu, 20 Oct 2011 21:26:47 +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: X-Archives-Hash: ff4f140ab5e7265a0108d319d1d80f5a commit: 8dfd8582e31a17c3adda9cba0f41545620289e5a Author: Zac Medico gentoo org> AuthorDate: Thu Oct 20 21:26:26 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Oct 20 21:26:26 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D8dfd8582 update_copyright: don't hardcode 1999 start year We want repoman to be applicable to as many repositories as possible. If necessary, we can add another layout.conf attribute that configures the copyright start years for all files. --- pym/repoman/utilities.py | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index a3fdf12..7f7d62a 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -548,12 +548,13 @@ def update_copyright(fn_path, year, pretend): new_header.append(line) break =20 - # these two regexes are taken from - # echangelog update_copyright() + # These two regexes are taken from echangelog + # update_copyright(), except that we don't hardcode + # 1999 here (in order to be more generic). line =3D re.sub(r'^(# Copyright \d+) ', r'\1-%s ' % year, line) - line =3D re.sub(r'^(# Copyright) \d\d\d\d-\d\d\d\d', - r'\1 1999-%s' % year, line) + line =3D re.sub(r'^(# Copyright \d\d\d\d)-\d\d\d\d', + r'\1-%s' % year, line) new_header.append(line) =20 difflines =3D 0