From patchwork Wed Jul 3 15:01:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 168420 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1015147ilk; Wed, 3 Jul 2019 08:01:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTvIaHv2oqP9z2Izly9LtbuHNh9IMxgIlwDtigw7SWgtJaRrxyUt1VxBC0oKQHCS22nWVW X-Received: by 2002:a17:902:e011:: with SMTP id ca17mr43744757plb.328.1562166096521; Wed, 03 Jul 2019 08:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562166096; cv=none; d=google.com; s=arc-20160816; b=YKTr+i+liCqc/nSn1UdwnCDeyEPXdZ5urUhoBXmO3IWjLytXjBT4EiqpXGUqIKi+k0 b5RzL4B4OUTJ5ZktRdjdjNxH+y6xtuMLQnvuVlYeXDMphlUGzitBPzkmoPhrJppWceOb sq0yVT7VigR7RScuNCSeWPurLS9fqa7TQCahZVbVtasbW4ssend1x3tnHPEgCPGl8/JZ /S/vOKJSo2YOieDaqxX1yHePmVb89CN1xV9RUaNBR7VEBmLqzYJ43AW3S0eggrYMaYm6 YaNHWl3zrc/JfgQgCdjTsKeISWE/0d26Qb3WChtwxkAPqJjagpXQTRN8kzCih/wSDvYI UK6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=6q6zGAF4Irwv6p8oJUcx31d+GKGDhWRNUOjADDGHF0M=; b=pNby26y2sGrB+kOy0rBd55TI1n7Ayuuh6ZbBF/+gV2DvzcOibwVFziW9CJ4Qocr55T AqQb79BCnL3nkI4qlJT3ZhyUktScB0DBsFMz4kYbMLV6yIUMUJsvpLeMsic6GbeOUS/5 hMkkHsM0bHwg5LNkciPeIugALW6lXuj15h8a943Rb7AXU+XsGMYKbmK/PEgWrYcnzmlQ imRvJM+Gr1oqKHAS8GVkqRaGT/S5+XFsPiee6HrHIXMgaT6hK7CdMJoyBlSWNu5ukWMi 8wWdBLWPntOt560cP51knveHdeNmrr5gcKmIcwM4IlT1Tt8AUFri8dhwNeojGzjAArpV zS4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=RmoDrgEJ; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id z17si2178454pjr.21.2019.07.03.08.01.35; Wed, 03 Jul 2019 08:01:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=RmoDrgEJ; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 13E017E6FA; Wed, 3 Jul 2019 15:01:32 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mail.openembedded.org (Postfix) with ESMTP id CC1716C44B for ; Wed, 3 Jul 2019 15:01:30 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id n4so3223719wrs.3 for ; Wed, 03 Jul 2019 08:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=FgSdoXWMnaX4Ovttret8mM6cXOooyOi5cJ63uqfy7qY=; b=RmoDrgEJ2bRRV28NI+w3ncaoZfG5hQ0YCOmuEPGwPVQiQkSJGxzh8zEcZrataAb9Wq 6KpNBq0ZeqYTwdX3onzVVHknkLBWeTCMOvS+4PZHZfYaoYggEx2XjzKs5cQ6Ha7n1H9u dMOgM+RmiuZvBUYmAOnL6KQ4cr93jZFWQpljbAAiXq5kGFb4rnQYSqpdE+Tw0bUw/CXj O0sCA1sEaLl/CGlRkQrOnKKodqohdMpBFgs7gtgbVxXCtDKrOtstCEunPDlKNtUvBcOz mVRWtAmmf4I97sfDDU81I0rC6Xjvky85va6WbiLQIX/n0pN6NiKj11OIqvjnG8ME970J kljA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=FgSdoXWMnaX4Ovttret8mM6cXOooyOi5cJ63uqfy7qY=; b=fKiygpBPZIYAP3P2bwpO9sDIA9C/x2HKOqNUt2mvqO5+nR/IV5fv8za5Uguqrctu1+ Jok9QUOv1uJ6fESOQ2PtkRrzBLZpHlVYRNSTIQ3e+dAJ/9yt66ckQAlU5Ft2O70aDu/n QFIB9hYgy2ePX2p50EgquIpLsRbfgJfBO+MO94RyUGMszXUVnMRpuCOS07vt8eRsiAjQ Wf6L75+6o6EWEy285Menner5fY5hWvSQo4btAbEpVwSpLvepbXZI+zD3RTtZtGZdelP5 /e6cdgXStZBLqkZQUaQy+eYAVVvJblQTfOnuNjLR5CbTBdrf+sDEGXQ9INlnMi2K2dRg HeqQ== X-Gm-Message-State: APjAAAXvEZ9sUTLsrSVBqH/NIehdsatEXSplYDH6H93DR39oPPgj3kP6 8UAIE1Nh5v7sU6W67r9sUNl8kmq+vrE= X-Received: by 2002:a05:6000:14b:: with SMTP id r11mr4566641wrx.196.1562166091049; Wed, 03 Jul 2019 08:01:31 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id x20sm4465418wrg.52.2019.07.03.08.01.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jul 2019 08:01:30 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Wed, 3 Jul 2019 16:01:28 +0100 Message-Id: <20190703150128.21192-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] insane: use clean_path for the host contamination warnings X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org We've a nice function to clean up absolute build paths for display, so use it. Signed-off-by: Ross Burton --- meta/classes/insane.bbclass | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 0695a044387..891d3a84218 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -874,15 +874,14 @@ def package_qa_check_host_user(path, name, d, elf, messages): if exc.errno != errno.ENOENT: raise else: - rootfs_path = path[len(dest):] check_uid = int(d.getVar('HOST_USER_UID')) if stat.st_uid == check_uid: - package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, rootfs_path, check_uid)) + package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_uid)) return False check_gid = int(d.getVar('HOST_USER_GID')) if stat.st_gid == check_gid: - package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, rootfs_path, check_gid)) + package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_gid)) return False return True