public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Fabian Groffen <grobian@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: [gentoo-portage-dev] [PATCH 1 of 3] repoman: get default to update changelog from layout.conf
Date: Wed, 19 Oct 2011 21:55:44 +0200	[thread overview]
Message-ID: <9e8ec5404f3cd20ce978.1319054144@nut.cheops.ods.org> (raw)
In-Reply-To: <patchbomb.1319054143@nut.cheops.ods.org>

Updating the ChangeLog file may be desirable in more repos than just the
one named 'gentoo', like e.g. the Prefix one.  Hence, make this default
configurable though metadata/layout.conf.

This commit must go accompanied by a commit to
gentoo-x86/metadata/layout.conf that adds the following bit:

# Bug #337853 - gentoo's council says to enable
# --echangelog by default for the "gentoo" repo
update-changelog = true

diff --git a/bin/repoman b/bin/repoman
--- a/bin/repoman
+++ b/bin/repoman
@@ -644,10 +644,7 @@
 		print(prefix + line)
 	sys.exit(1)
 
-if options.echangelog is None and \
-	repo_config.name == "gentoo":
-	# Bug #337853 - gentoo's council says to enable
-	# --echangelog by default for the "gentoo" repo
+if options.echangelog is None and repo_config.update_changelog:
 	options.echangelog = 'y'
 
 if vcs is None:
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -48,7 +48,7 @@
 		'eclass_overrides', 'eclass_locations', 'format', 'location',
 		'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
 		'name', 'priority', 'sign_manifest', 'sync', 'thin_manifest',
-		'user_location')
+		'update_changelog', 'user_location')
 
 	def __init__(self, name, repo_opts):
 		"""Build a RepoConfig with options in repo_opts
@@ -126,6 +126,7 @@
 		self.create_manifest = True
 		self.disable_manifest = False
 		self.manifest_hashes = None
+		self.update_changelog = False
 		self.cache_format = None
 
 	def get_pregenerated_cache(self, auxdbkeys, readonly=True, force=False):
@@ -431,6 +432,9 @@
 						DeprecationWarning)
 			repo.manifest_hashes = manifest_hashes
 
+			if layout_data.get('update-changelog', '').lower() == 'true':
+				repo.update_changelog = True
+
 		#Take aliases into account.
 		new_prepos = {}
 		for repo_name, repo in prepos.items():



  reply	other threads:[~2011-10-19 19:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 19:55 [gentoo-portage-dev] [PATCH 0 of 3] repoman changelog patches Fabian Groffen
2011-10-19 19:55 ` Fabian Groffen [this message]
2011-10-19 19:55 ` [gentoo-portage-dev] [PATCH 2 of 3] repoman: get ChangeLog header from skel.ChangeLog Fabian Groffen
2011-10-19 21:58   ` Zac Medico
2011-10-20 17:36     ` Fabian Groffen
2011-10-19 19:55 ` [gentoo-portage-dev] [PATCH 3 of 3] repoman: update copyright on modified files Fabian Groffen
2011-10-19 22:14   ` Zac Medico
2011-10-20 18:23     ` [gentoo-portage-dev] [PATCH] " Fabian Groffen
2011-10-20 18:38       ` Zac Medico
2011-10-20 18:55       ` Mike Gilbert
2011-10-20 19:12         ` Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e8ec5404f3cd20ce978.1319054144@nut.cheops.ods.org \
    --to=grobian@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox