public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
@ 2011-02-06 13:09 Thomas Sachau
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
  To: gentoo-commits

commit:     12fda364c7d7fc6ce36f2a10bdcfc38adab27110
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 27 02:48:47 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Thu Jan 27 02:48:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=12fda364

binarytree: fix BASE_URI for old-style binhost

---
 pym/portage/dbapi/bintree.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 5453622..027503c 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -945,6 +945,7 @@ class binarytree(object):
 					remote_metadata = self.__remotepkgs[mypkg]
 					for k, v in remote_metadata.items():
 						remote_metadata[k] = v.strip()
+					remote_metadata["BASE_URI"] = base_url
 
 					# Eliminate metadata values with names that digestCheck
 					# uses, since they are not valid when using the old



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
@ 2011-02-06 13:09 Thomas Sachau
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
  To: gentoo-commits

commit:     92c25530595135e400d47128bc3b37e5e1806dc5
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 27 02:32:18 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Thu Jan 27 02:32:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=92c25530

binarytree: fix broken BASE_URI initialization

---
 pym/portage/dbapi/bintree.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index cc6203a..5453622 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -861,9 +861,11 @@ class binarytree(object):
 			if pkgindex:
 				# Organize remote package list as a cpv -> metadata map.
 				remotepkgs = _pkgindex_cpv_map_latest_build(pkgindex)
+				remote_base_uri = pkgindex.header.get("URI", base_url)
+				for remote_metadata in remotepkgs.values():
+					remote_metadata["BASE_URI"] = remote_base_uri
 				self._remotepkgs.update(remotepkgs)
 				self._remote_has_index = True
-				remote_base_uri = pkgindex.header.get("URI", base_url)
 				for cpv in remotepkgs:
 					self.dbapi.cpv_inject(cpv)
 				if True:
@@ -874,7 +876,6 @@ class binarytree(object):
 						remote_metadata = self._remotepkgs.get(cpv)
 						if remote_metadata is None:
 							continue
-						remote_metadata["BASE_URI"] = remote_base_uri
 						# Use digests to compare identity.
 						identical = True
 						for hash_name in hash_names:



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
@ 2011-02-06 13:09 Thomas Sachau
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
  To: gentoo-commits

commit:     a607079b3b556de243e955cda7ae9a3defd26750
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 04:11:00 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 04:11:00 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a607079b

bintree: warn for missing binhost TIMESTAMP

This seems to be the case that's triggered in bug 353189 and bug 350139.

---
 pym/portage/dbapi/bintree.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 027503c..254ed02 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -808,6 +808,8 @@ class binarytree(object):
 					if not remote_timestamp:
 						# no timestamp in the header, something's wrong
 						pkgindex = None
+						writemsg(_("\n\n!!! Binhost package index " \
+						" has no TIMESTAMP field.\n"), noiselevel=-1)
 					else:
 						if not self._pkgindex_version_supported(rmt_idx):
 							writemsg(_("\n\n!!! Binhost package index version" \



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
@ 2011-02-06 13:09 Thomas Sachau
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
  To: gentoo-commits

commit:     c04225dddbe83ba371258ffdc4be7842ab672fff
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  1 04:42:46 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Tue Feb  1 04:42:46 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c04225dd

_MergeProcess: use default SIGINT/TERM handlers

Signal handlers inherited from the parent process are irrelevant here.

---
 pym/portage/dbapi/_MergeProcess.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py
index 3cf50d2..f717d12 100644
--- a/pym/portage/dbapi/_MergeProcess.py
+++ b/pym/portage/dbapi/_MergeProcess.py
@@ -1,6 +1,7 @@
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+import signal
 import traceback
 
 import portage
@@ -29,6 +30,11 @@ class MergeProcess(SpawnProcess):
 
 		portage.process._setup_pipes(fd_pipes)
 
+		# Use default signal handlers since the ones inherited
+		# from the parent process are irrelevant here.
+		signal.signal(signal.SIGINT, signal.SIG_DFL)
+		signal.signal(signal.SIGTERM, signal.SIG_DFL)
+
 		portage.output.havecolor = self.dblink.settings.get('NOCOLOR') \
 			not in ('yes', 'true')
 



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
@ 2011-02-06 13:10 Thomas Sachau
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:10 UTC (permalink / raw
  To: gentoo-commits

commit:     6e00e9338d22df9308e13b51956001b34341cd1e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  3 07:05:28 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Thu Feb  3 07:05:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6e00e933

bintree: add missing del from previous commit

---
 pym/portage/dbapi/bintree.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index a9c614d..4857e7f 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -960,7 +960,7 @@ class binarytree(object):
 				except:
 					writemsg(_("!!! Failed to inject remote binary package: %s\n") % fullpkg,
 						noiselevel=-1)
-					remotepkgs[mypkg]
+					del remotepkgs[mypkg]
 					continue
 		self.populated=1
 



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
@ 2011-02-06 13:10 Thomas Sachau
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:10 UTC (permalink / raw
  To: gentoo-commits

commit:     76c386bea08a5d75cfc431fffe64e842aeff5fa9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  3 07:12:24 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Thu Feb  3 07:12:24 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=76c386be

bintree: clean up dict use in old binhost code

---
 pym/portage/dbapi/bintree.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 4857e7f..6e58608 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -912,13 +912,14 @@ class binarytree(object):
 				base_url, chunk_size=chunk_size)
 
 			for mypkg, remote_metadata in list(remotepkgs.items()):
-				if "CATEGORY" not in remote_metadata:
+				mycat = remote_metadata.get("CATEGORY")
+				if mycat is None:
 					#old-style or corrupt package
 					writemsg(_("!!! Invalid remote binary package: %s\n") % mypkg,
 						noiselevel=-1)
 					del remotepkgs[mypkg]
 					continue
-				mycat = remotepkgs[mypkg]["CATEGORY"].strip()
+				mycat = mycat.strip()
 				fullpkg = mycat+"/"+mypkg[:-5]
 
 				if fullpkg in metadata:



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
@ 2011-02-06 13:10 Thomas Sachau
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:10 UTC (permalink / raw
  To: gentoo-commits

commit:     0bf4d79c8ad483c3c8a65210eb2af27e41f52714
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  3 05:51:19 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Thu Feb  3 05:51:19 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0bf4d79c

bintree: remove unused __remotepkgs

---
 pym/portage/dbapi/bintree.py |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 254ed02..a9c614d 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -225,7 +225,6 @@ class binarytree(object):
 			self.tree = {}
 			self._remote_has_index = False
 			self._remotepkgs = None # remote metadata indexed by cpv
-			self.__remotepkgs = {}  # indexed by tbz2 name (deprecated)
 			self.invalids = []
 			self.settings = settings
 			self._pkg_paths = {}
@@ -731,7 +730,6 @@ class binarytree(object):
 			self.populated=1
 			return
 		self._remotepkgs = {}
-		self.__remotepkgs = {}
 		for base_url in self.settings["PORTAGE_BINHOST"].split():
 			parsed_url = urlparse(base_url)
 			host = parsed_url.netloc
@@ -912,17 +910,15 @@ class binarytree(object):
 				re.sub(r'//(.+):.+@(.+)/', r'//\1:*password*@\2/', base_url) + "\n")
 			remotepkgs = portage.getbinpkg.dir_get_metadata(
 				base_url, chunk_size=chunk_size)
-			self.__remotepkgs.update(remotepkgs)
-			#writemsg(green("  -- DONE!\n\n"))
 
-			for mypkg in list(remotepkgs):
-				if "CATEGORY" not in self.__remotepkgs[mypkg]:
+			for mypkg, remote_metadata in list(remotepkgs.items()):
+				if "CATEGORY" not in remote_metadata:
 					#old-style or corrupt package
 					writemsg(_("!!! Invalid remote binary package: %s\n") % mypkg,
 						noiselevel=-1)
-					del self.__remotepkgs[mypkg]
+					del remotepkgs[mypkg]
 					continue
-				mycat = self.__remotepkgs[mypkg]["CATEGORY"].strip()
+				mycat = remotepkgs[mypkg]["CATEGORY"].strip()
 				fullpkg = mycat+"/"+mypkg[:-5]
 
 				if fullpkg in metadata:
@@ -944,7 +940,6 @@ class binarytree(object):
 				try:
 					# invalid tbz2's can hurt things.
 					self.dbapi.cpv_inject(fullpkg)
-					remote_metadata = self.__remotepkgs[mypkg]
 					for k, v in remote_metadata.items():
 						remote_metadata[k] = v.strip()
 					remote_metadata["BASE_URI"] = base_url
@@ -965,7 +960,7 @@ class binarytree(object):
 				except:
 					writemsg(_("!!! Failed to inject remote binary package: %s\n") % fullpkg,
 						noiselevel=-1)
-					del self.__remotepkgs[mypkg]
+					remotepkgs[mypkg]
 					continue
 		self.populated=1
 



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
@ 2011-02-06 13:10 Thomas Sachau
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:10 UTC (permalink / raw
  To: gentoo-commits

commit:     a91c01e480288cea6ae2cfc49d5ea72803cd4724
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  3 07:48:55 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Thu Feb  3 07:48:55 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a91c01e4

bintree: cleanup/fix old binhost code more

---
 pym/portage/dbapi/bintree.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 6e58608..993df77 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -1,4 +1,4 @@
-# Copyright 1998-2010 Gentoo Foundation
+# Copyright 1998-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = ["bindbapi", "binarytree"]
@@ -911,13 +911,12 @@ class binarytree(object):
 			remotepkgs = portage.getbinpkg.dir_get_metadata(
 				base_url, chunk_size=chunk_size)
 
-			for mypkg, remote_metadata in list(remotepkgs.items()):
+			for mypkg, remote_metadata in remotepkgs.items():
 				mycat = remote_metadata.get("CATEGORY")
 				if mycat is None:
 					#old-style or corrupt package
 					writemsg(_("!!! Invalid remote binary package: %s\n") % mypkg,
 						noiselevel=-1)
-					del remotepkgs[mypkg]
 					continue
 				mycat = mycat.strip()
 				fullpkg = mycat+"/"+mypkg[:-5]
@@ -961,7 +960,6 @@ class binarytree(object):
 				except:
 					writemsg(_("!!! Failed to inject remote binary package: %s\n") % fullpkg,
 						noiselevel=-1)
-					del remotepkgs[mypkg]
 					continue
 		self.populated=1
 



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-06 13:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-06 13:10 [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/ Thomas Sachau
  -- strict thread matches above, loose matches on Subject: below --
2011-02-06 13:10 Thomas Sachau
2011-02-06 13:10 Thomas Sachau
2011-02-06 13:10 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox