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 0C89159CA3 for ; Tue, 15 Mar 2016 19:00:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A018FE07B3; Tue, 15 Mar 2016 19:00:51 +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 046BDE07B3 for ; Tue, 15 Mar 2016 19:00:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 9DD92340C35 for ; Tue, 15 Mar 2016 19:00:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CEA7185B for ; Tue, 15 Mar 2016 19:00:47 +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: <1458068228.e9b63ed5c5e9f169c333b1d98613ec574ad946c8.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: e9b63ed5c5e9f169c333b1d98613ec574ad946c8 X-VCS-Branch: repoman Date: Tue, 15 Mar 2016 19:00: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 X-Archives-Salt: 5b9b9826-074e-4f4e-9391-3210c4f14f75 X-Archives-Hash: 45c130dbdf4c5b18b7fa8394f0b1a908 commit: e9b63ed5c5e9f169c333b1d98613ec574ad946c8 Author: Zac Medico gentoo org> AuthorDate: Mon Feb 1 07:47:49 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Tue Mar 15 18:57:08 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e9b63ed5 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 = []