From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DD70B1381F3 for ; Thu, 21 Apr 2016 16:55:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B77221C076; Thu, 21 Apr 2016 16:54:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2884A21C073 for ; Thu, 21 Apr 2016 16:54:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E8907340B90 for ; Thu, 21 Apr 2016 16:54:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E59782323 for ; Thu, 21 Apr 2016 16:54:35 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1461257369.9e04f437f9397309905eb88cf4e5da2052a60da3.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/actions.py pym/repoman/utilities.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 9e04f437f9397309905eb88cf4e5da2052a60da3 X-VCS-Branch: repoman Date: Thu, 21 Apr 2016 16:54:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: dfb2ed10-a99e-4f2d-96b4-bba530cc2a75 X-Archives-Hash: d35cab272e9f2c1d535d0bbabaa403a5 commit: 9e04f437f9397309905eb88cf4e5da2052a60da3 Author: Zac Medico gentoo org> AuthorDate: Mon Feb 1 07:47:49 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Thu Apr 21 16:49:29 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9e04f437 repoman/actions.py: fix copyright update (bug 405017) The Actions.perform method failed to update copyright for new and changed files with --echangelog=n, so fix it to handle this case. X-Gentoo-Bug: 405017 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=405017 pym/repoman/actions.py | 9 +++++++++ pym/repoman/utilities.py | 7 ------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py index c0cd5cc..643e24c 100644 --- a/pym/repoman/actions.py +++ b/pym/repoman/actions.py @@ -9,6 +9,7 @@ import platform import signal import sys import tempfile +import time from itertools import chain from _emerge.UserQuery import UserQuery @@ -22,6 +23,7 @@ from portage.output import ( from portage.package.ebuild.digestgen import digestgen from portage.util import writemsg_level +from repoman.copyrights import update_copyright from repoman.gpg import gpgsign, need_signature from repoman import utilities from repoman.modules.vcs.vcs import vcs_files_to_cps @@ -111,6 +113,13 @@ class Actions(object): commitmessage = commitmessage.rstrip() + # Update copyright for new and changed files + year = time.strftime('%Y', time.gmtime()) + for fn in chain(mynew, mychanged): + if fn.endswith('.diff') or fn.endswith('.patch'): + continue + update_copyright(fn, year, pretend=self.options.pretend) + myupdates, broken_changelog_manifests = self.changelogs( myupdates, mymanifests, myremoved, mychanged, myautoadd, mynew, commitmessage) diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index 47b5aab..8a757dc 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -395,13 +395,6 @@ def UpdateChangeLog( year = time.strftime('%Y', gmtime) date = time.strftime('%d %b %Y', gmtime) - # check modified files and the ChangeLog for copyright updates - # patches and diffs (identified by .patch and .diff) are excluded - for fn in chain(new, changed): - if fn.endswith('.diff') or fn.endswith('.patch'): - continue - update_copyright(os.path.join(pkgdir, fn), year, pretend=pretend) - cl_path = os.path.join(pkgdir, 'ChangeLog') clold_lines = [] clnew_lines = []