diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-30 22:15:13 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-30 22:16:10 +0100 |
commit | c0c657bd92911788b96d9670620eabf024453752 (patch) | |
tree | 774a5e2d966d6ee87da17cd063580d5970564d00 /meta-extras/packages/yum/files/yum-install-recommends.py | |
parent | e71a306f9cac8e30e689d607e2092e11a756ef5d (diff) | |
download | poky-c0c657bd92911788b96d9670620eabf024453752.tar.gz |
Split meta-extras and meta-moblin out of the main repository
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta-extras/packages/yum/files/yum-install-recommends.py')
-rwxr-xr-x | meta-extras/packages/yum/files/yum-install-recommends.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/meta-extras/packages/yum/files/yum-install-recommends.py b/meta-extras/packages/yum/files/yum-install-recommends.py deleted file mode 100755 index 64716f2c3e..0000000000 --- a/meta-extras/packages/yum/files/yum-install-recommends.py +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | #!/usr/bin/env python | ||
2 | import os, sys | ||
3 | |||
4 | root = sys.argv[1] | ||
5 | installcmd = sys.argv[2] | ||
6 | |||
7 | # | ||
8 | # Take an rpm image and look through for Recommends:. For each recommends | ||
9 | # found, try and install any matching packages including any Recommends for | ||
10 | # packages installed by us. | ||
11 | # | ||
12 | |||
13 | |||
14 | def get_recommends(): | ||
15 | deps = [] | ||
16 | output = os.popen("rpm --root %s -aq --recommends" % (root)) | ||
17 | lines = output.readlines() | ||
18 | for line in lines: | ||
19 | line = line.replace("(none)","") | ||
20 | if line: | ||
21 | deps.append(line.split()[0]) | ||
22 | return deps | ||
23 | |||
24 | processed = [] | ||
25 | |||
26 | while True: | ||
27 | toinstall = [] | ||
28 | recommends = set(get_recommends()) | ||
29 | for item in recommends: | ||
30 | if item not in processed: | ||
31 | toinstall.append(item) | ||
32 | if len(toinstall) != 0: | ||
33 | print "Installing %s" % " ".join(toinstall) | ||
34 | os.system("%s %s" % (installcmd, " ".join(toinstall))) | ||
35 | else: | ||
36 | break | ||
37 | processed.extend(toinstall) | ||
38 | |||
39 | |||