From 076c6637583328dc814828e1d10affb4e2666368 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 2 Jun 2013 15:42:38 -0700 Subject: [PATCH] treewalk: skip CHOST warning for binary packages The CHOST of a binary package does not necessarily match the make.conf setting, especially if ACCEPT_CHOSTS is configured to match other CHOST values. --- pym/portage/dbapi/vartree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index c6eaabfc0..e1a4753ce 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3555,6 +3555,7 @@ class dblink(object): level=logging.ERROR, noiselevel=-1) return 1 + is_binpkg = self.settings.get("EMERGE_FROM") == "binary" slot = '' for var_name in ('CHOST', 'SLOT'): if var_name == 'CHOST' and self.cat == 'virtual': @@ -3588,7 +3589,9 @@ class dblink(object): return 1 write_atomic(os.path.join(inforoot, var_name), slot + '\n') - if val != self.settings.get(var_name, ''): + # This check only applies when built from source, since + # inforoot values are written just after src_install. + if not is_binpkg and val != self.settings.get(var_name, ''): self._eqawarn('preinst', [_("QA Notice: Expected %(var_name)s='%(expected_value)s', got '%(actual_value)s'\n") % \ {"var_name":var_name, "expected_value":self.settings.get(var_name, ''), "actual_value":val}]) -- 2.26.2