From patchwork Thu Jul 4 10:36:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 168468 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2093567ilk; Thu, 4 Jul 2019 03:36:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIEyhAL1crKMBCcoNcs4WeOyJeW9IU5b4A5xxoZFCmFfzpFj46njNk6LUGq2YAzUeS1BRn X-Received: by 2002:a17:902:e707:: with SMTP id co7mr21589996plb.136.1562236610071; Thu, 04 Jul 2019 03:36:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562236610; cv=none; d=google.com; s=arc-20160816; b=db90UsYa88GF97VmH+bJWXN5OvxndVeQxeMzlpnWqGa2swR49SkVJWvIEk1rbQV6w2 hKr14Suj9fbAvBIbiUSMRhf8bfN3+7dWFoVfKxULmlv4/pW16rLd96wok2cpdy5a78h9 jWZUGTzREo62MXEBOXFvVMT1rXOelZ7ojHcs0M+7ctBucE4oNJZb0e8/R41r570XEwMx lk1bE2sQyQQ4FxEocUlZsuLYeNtccnoA40kUAfFNbiRgD/pbcejppf9Dy6LlfGyVquyN RVsZUIU2iBdC1jsKG76hDIxLfXdHEGvoprN69EA8ueub8sfYglB1Wfc8Ba1VH6FYejzN LVGw== 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=QnRwDDYOWBO9ZXzba9EA1+dvJb09eogTj0yWyHkkieE=; b=O1v/4wv0BZpuUvMqR8hpG00nBo14cDY3hfcGS+kN5a7gnEiR+cfACa3n+SrKhHxHsb uJp7UpqL0O41CgDIohiJ2f1ke4Xv9qWhmwkJ/C/Z8OJTPC53uu2jLsTQ+zjF6gTVfRwT NGw8CFupEK6ILMDzi1s76C3tSkHuZGDfCOSOdEgt1Pqogu7n79n/o/KZm2MwRk4vjM5e FoMcvLIl36UFr9zwQCqrdQrB8SsHEOuIfRh/dBDaxL9SJwf08t2DohlkGnd26fgacv1B /zDHadxrJnvXG3p7V+p3MIvFjs7PRv6TDNvFnQP0XqWUG1OrksXvze0R6oWkMVpCQGeG QT/w== 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=ByfOLIjM; 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 19si5037477pga.554.2019.07.04.03.36.49; Thu, 04 Jul 2019 03:36:50 -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=ByfOLIjM; 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 D61227EB11; Thu, 4 Jul 2019 10:36:46 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mail.openembedded.org (Postfix) with ESMTP id B7DAF7E86D for ; Thu, 4 Jul 2019 10:36:44 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id b2so4833998wrx.11 for ; Thu, 04 Jul 2019 03:36:46 -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=TVyC2p/W2aHaKLf74q7zEzq33q3TW7HJYy84Yk0LN4g=; b=ByfOLIjM4DDP85+ag8rhSt6b02xXIOtZyoevPD0+NTXMzC58JprsvnsBlDY8u0FER2 nd3lbiv2olVzmm5BaU9+SibhaeyE4AnHlBvSlmi2A0vvvFG3UP6T7PmmSDjRtEfGnlsR CMSbmTnOrL5LBnTwuWTpl+k/fUUBPuPwUJvC4h9mtlQNtEl7x8UnhfkZridAtggaSgJq SDOV6IBkaOv0cADxR3XP7H7UmG0tCusFxYjk9AuFMf6fedsGgaAk7CyjzG7TKSzJQirZ JqhNNBSmM0dc6zyINDBQZHXS01r7KmYZjXfPAqNjpfSpWVWs/Wjk3QRubzE7pSEyMQwx 0e/w== 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=TVyC2p/W2aHaKLf74q7zEzq33q3TW7HJYy84Yk0LN4g=; b=lWThe4KWSY9G+2NxRJQ3J/HJJB/KDOOfjs8FY+qFldHkV3cSM5UW3aJizhVwknSBZ/ HTReQHlqhuc6ALtyfTMBw2kd3aksALv6NP3A4VJVU7x34X58ZaoaCwPSWNJMzerMjEcE 4p8bpT8G1hkPgFiX4D4c9fBhYQCRFgZ3+NpT0pk01enDtQGdoiT1s83RKYWDdFBJplcc vP6uoH+UvcqwSAKL2jB0il7RPCSN6l0nR+CmfxRrDyT33enelopc9Y1m7TTRX//Fidtl D7gk1bdI6uc25nvE6607w0Fozk9P+qykgrWfyTKJ7FxiHEV58Wu4awAOqKozgw2tRTYf qlFg== X-Gm-Message-State: APjAAAXVitaB558VBrOGF35yhnSpZDQGRft56+7lGNj3fEB8oabiGTtZ iCSVXlKmZMStdVfNVgWQdHjDibgeJmE= X-Received: by 2002:adf:ec8e:: with SMTP id z14mr8760065wrn.125.1562236605120; Thu, 04 Jul 2019 03:36:45 -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 z17sm5411602wrr.13.2019.07.04.03.36.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2019 03:36:44 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 4 Jul 2019 11:36:42 +0100 Message-Id: <20190704103642.2187-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] buildhistory_analysis: ignore ownership for sysroot diffs 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 The sysroot isn't populated under pseudo, so ownership differences should be ignored. Signed-off-by: Ross Burton --- meta/lib/oe/buildhistory_analysis.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 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/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py index 8af76c6b3a3..708e1b388e2 100644 --- a/meta/lib/oe/buildhistory_analysis.py +++ b/meta/lib/oe/buildhistory_analysis.py @@ -282,7 +282,7 @@ def file_list_to_dict(lines): return adict -def compare_file_lists(alines, blines): +def compare_file_lists(alines, blines, compare_ownership=True): adict = file_list_to_dict(alines) bdict = file_list_to_dict(blines) filechanges = [] @@ -294,16 +294,20 @@ def compare_file_lists(alines, blines): newvalue = newsplitv[0][0] if oldvalue != newvalue: filechanges.append(FileChange(path, FileChange.changetype_type, oldvalue, newvalue)) + # Check permissions oldvalue = splitv[0][1:] newvalue = newsplitv[0][1:] if oldvalue != newvalue: filechanges.append(FileChange(path, FileChange.changetype_perms, oldvalue, newvalue)) - # Check owner/group - oldvalue = '%s/%s' % (splitv[1], splitv[2]) - newvalue = '%s/%s' % (newsplitv[1], newsplitv[2]) - if oldvalue != newvalue: - filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue)) + + if compare_ownership: + # Check owner/group + oldvalue = '%s/%s' % (splitv[1], splitv[2]) + newvalue = '%s/%s' % (newsplitv[1], newsplitv[2]) + if oldvalue != newvalue: + filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue)) + # Check symlink target if newsplitv[0][0] == 'l': if len(splitv) > 3: @@ -574,7 +578,7 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep elif filename == 'sysroot': alines = d.a_blob.data_stream.read().decode('utf-8').splitlines() blines = d.b_blob.data_stream.read().decode('utf-8').splitlines() - filechanges = compare_file_lists(alines,blines) + filechanges = compare_file_lists(alines,blines, compare_ownership=False) if filechanges: chg = ChangeRecord(path, filename, None, None, True) chg.filechanges = filechanges