All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis R. Rodriguez <mcgrof@kernel.org>
To: lkp@lists.01.org
Subject: [PATCH 3/4] lib/install.*: make package dependency list uniq
Date: Fri, 06 Jan 2017 11:06:51 -0800	[thread overview]
Message-ID: <20170106190652.31544-4-mcgrof@kernel.org> (raw)
In-Reply-To: <20170106190652.31544-1-mcgrof@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

This provides a small optimization to reduce the list of
package dependencies we give back to the distribution installer
by making the list uniq. Since bash is rather stupid we need to
first sort the list prior to passing it to sort.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 lib/install.rb | 2 +-
 lib/install.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/install.rb b/lib/install.rb
index 63b11ad1a5b2..8f40e3e902bc 100755
--- a/lib/install.rb
+++ b/lib/install.rb
@@ -31,5 +31,5 @@ def get_dependency_packages(distro, script)
 
 	packages = adapt_packages(distro, generic_packages)
 
-	return packages.flatten.compact
+	return packages.flatten.compact.uniq
 end
diff --git a/lib/install.sh b/lib/install.sh
index 0b090f8b82bf..cb9a8d0ea530 100755
--- a/lib/install.sh
+++ b/lib/install.sh
@@ -61,5 +61,5 @@ get_dependency_packages()
 
 	local generic_packages="$(sed 's/#.*//' "$base_file")"
 
-	adapt_packages
+	adapt_packages | sort | uniq
 }
-- 
2.11.0


  parent reply	other threads:[~2017-01-06 19:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 19:06 [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
2017-01-06 19:06 ` [PATCH 1/4] lib/install.sh: fix shell adapt_packages() Luis R. Rodriguez
2017-01-09  7:39   ` Ye Xiaolong
2017-01-06 19:06 ` [PATCH 2/4] distro: add initial opensuse support Luis R. Rodriguez
2017-01-09  7:40   ` Ye Xiaolong
2017-01-06 19:06 ` Luis R. Rodriguez [this message]
2017-01-09  7:40   ` [PATCH 3/4] lib/install.*: make package dependency list uniq Ye Xiaolong
2017-01-06 19:06 ` [PATCH 4/4] .gitignore: add bin/event/wakeup Luis R. Rodriguez
2017-01-09  7:40   ` Ye Xiaolong
2017-01-06 19:58 ` [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
2017-01-09  7:49 ` Ye Xiaolong
2017-01-09 14:26   ` Luis R. Rodriguez
2017-01-10  2:11     ` Ye Xiaolong
2017-01-10 14:25       ` Luis R. Rodriguez
2017-01-11  1:52         ` Ye Xiaolong
2017-01-11 14:34           ` Luis R. Rodriguez
2017-02-21  1:56             ` WARNING:at_lib/test_linktables/test-linktables.c:#test_linktable_init Ye Xiaolong
2017-01-09  8:48 ` [PATCH 0/4] lkp: add initial opensuse support Philip Li

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=20170106190652.31544-4-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=lkp@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.