diff options
Diffstat (limited to 'meta/packages/yum/files')
-rw-r--r-- | meta/packages/yum/files/extract-postinst.awk | 11 | ||||
-rw-r--r-- | meta/packages/yum/files/hacks.patch | 72 | ||||
-rw-r--r-- | meta/packages/yum/files/paths.patch | 88 | ||||
-rwxr-xr-x | meta/packages/yum/files/yum-install-recommends.py | 39 |
4 files changed, 210 insertions, 0 deletions
diff --git a/meta/packages/yum/files/extract-postinst.awk b/meta/packages/yum/files/extract-postinst.awk new file mode 100644 index 0000000000..8f2836b32c --- /dev/null +++ b/meta/packages/yum/files/extract-postinst.awk | |||
@@ -0,0 +1,11 @@ | |||
1 | /Name:.*/ { | ||
2 | package = substr($0, 7) | ||
3 | next | ||
4 | } | ||
5 | /postinstall.*scriptlet .*/ { | ||
6 | next | ||
7 | } | ||
8 | { | ||
9 | print $0 >> ENVIRON["D"] "/etc/rpm-postinsts/" package ".sh" | ||
10 | } | ||
11 | |||
diff --git a/meta/packages/yum/files/hacks.patch b/meta/packages/yum/files/hacks.patch new file mode 100644 index 0000000000..d0232ec9be --- /dev/null +++ b/meta/packages/yum/files/hacks.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | --- | ||
2 | rpmUtils/arch.py | 3 +++ | ||
3 | rpmUtils/transaction.py | 1 + | ||
4 | yum/constants.py | 2 +- | ||
5 | yum/depsolve.py | 2 ++ | ||
6 | 4 files changed, 7 insertions(+), 1 deletion(-) | ||
7 | |||
8 | Index: yum-3.2.18/rpmUtils/arch.py | ||
9 | =================================================================== | ||
10 | --- yum-3.2.18.orig/rpmUtils/arch.py 2008-06-17 14:05:42.000000000 +0100 | ||
11 | +++ yum-3.2.18/rpmUtils/arch.py 2008-09-01 15:47:11.000000000 +0100 | ||
12 | @@ -275,6 +275,7 @@ | ||
13 | return arch | ||
14 | |||
15 | def getCanonArch(skipRpmPlatform = 0): | ||
16 | + return "arm" | ||
17 | if not skipRpmPlatform and os.access("/etc/rpm/platform", os.R_OK): | ||
18 | try: | ||
19 | f = open("/etc/rpm/platform", "r") | ||
20 | @@ -331,6 +332,8 @@ | ||
21 | base arch is the arch before noarch in the arches dict if myarch is not | ||
22 | a key in the multilibArches.""" | ||
23 | |||
24 | + return "arm" | ||
25 | + | ||
26 | if not myarch: | ||
27 | myarch = canonArch | ||
28 | |||
29 | Index: yum-3.2.18/rpmUtils/transaction.py | ||
30 | =================================================================== | ||
31 | --- yum-3.2.18.orig/rpmUtils/transaction.py 2008-06-17 14:05:42.000000000 +0100 | ||
32 | +++ yum-3.2.18/rpmUtils/transaction.py 2008-09-03 17:55:27.000000000 +0100 | ||
33 | @@ -43,6 +43,7 @@ | ||
34 | 'clean'] | ||
35 | self.tsflags = [] | ||
36 | self.open = True | ||
37 | + self.ts.setProbFilter(rpm.RPMPROB_FILTER_IGNOREOS | rpm.RPMPROB_FILTER_IGNOREARCH) | ||
38 | |||
39 | def __del__(self): | ||
40 | # Automatically close the rpm transaction when the reference is lost | ||
41 | Index: yum-3.2.18/yum/constants.py | ||
42 | =================================================================== | ||
43 | --- yum-3.2.18.orig/yum/constants.py 2008-07-21 16:56:54.000000000 +0100 | ||
44 | +++ yum-3.2.18/yum/constants.py 2008-09-01 15:47:11.000000000 +0100 | ||
45 | @@ -17,7 +17,7 @@ | ||
46 | """ | ||
47 | |||
48 | #Constants | ||
49 | -YUM_PID_FILE = '/var/run/yum.pid' | ||
50 | +YUM_PID_FILE = '/var/run2/yum.pid' | ||
51 | |||
52 | #transaction set states | ||
53 | TS_UPDATE = 10 | ||
54 | Index: yum-3.2.18/yum/depsolve.py | ||
55 | =================================================================== | ||
56 | --- yum-3.2.18.orig/yum/depsolve.py 2008-08-06 17:05:16.000000000 +0100 | ||
57 | +++ yum-3.2.18/yum/depsolve.py 2008-09-03 21:05:52.000000000 +0100 | ||
58 | @@ -141,9 +141,14 @@ | ||
59 | else: | ||
60 | self.logger.critical(_('Invalid tsflag in config file: %s'), flag) | ||
61 | |||
62 | + self._ts.addTsFlag(rpm.RPMTRANS_FLAG_NOPOST) | ||
63 | + self._ts.addTsFlag(rpm.RPMTRANS_FLAG_NOTRIGGERS) | ||
64 | + | ||
65 | probfilter = 0 | ||
66 | for flag in self.tsInfo.probFilterFlags: | ||
67 | probfilter |= flag | ||
68 | + probfilter |= rpm.RPMPROB_FILTER_IGNOREOS | ||
69 | + probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH | ||
70 | self._ts.setProbFilter(probfilter) | ||
71 | |||
72 | def whatProvides(self, name, flags, version): | ||
diff --git a/meta/packages/yum/files/paths.patch b/meta/packages/yum/files/paths.patch new file mode 100644 index 0000000000..ee5c999c4b --- /dev/null +++ b/meta/packages/yum/files/paths.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | Index: yum-3.2.18/Makefile | ||
2 | =================================================================== | ||
3 | --- yum-3.2.18.orig/Makefile 2008-08-23 09:13:56.000000000 +0100 | ||
4 | +++ yum-3.2.18/Makefile 2008-08-23 09:18:09.000000000 +0100 | ||
5 | @@ -18,19 +18,19 @@ | ||
6 | for d in $(SUBDIRS); do make PYTHON=$(PYTHON) -C $$d; [ $$? = 0 ] || exit 1 ; done | ||
7 | |||
8 | install: | ||
9 | - mkdir -p $(DESTDIR)/usr/share/yum-cli | ||
10 | + mkdir -p $(DESTDIR)$(datadir)/yum-cli | ||
11 | for p in $(PYFILES) ; do \ | ||
12 | - install -m 644 $$p $(DESTDIR)/usr/share/yum-cli/$$p; \ | ||
13 | + install -m 644 $$p $(DESTDIR)$(datadir)/yum-cli/$$p; \ | ||
14 | done | ||
15 | - mv $(DESTDIR)/usr/share/yum-cli/yum-updatesd.py $(DESTDIR)/usr/share/yum-cli/yumupd.py | ||
16 | - $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-cli', 1, '$(PYDIR)', 1)" | ||
17 | + mv $(DESTDIR)$(datadir)/yum-cli/yum-updatesd.py $(DESTDIR)$(datadir)/yum-cli/yumupd.py | ||
18 | + $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)$(datadir)/yum-cli', 1, '$(PYDIR)', 1)" | ||
19 | |||
20 | - mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin | ||
21 | - install -m 755 bin/yum.py $(DESTDIR)/usr/bin/yum | ||
22 | - install -m 755 bin/yum-updatesd.py $(DESTDIR)/usr/sbin/yum-updatesd | ||
23 | + mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) | ||
24 | + install -m 755 bin/yum.py $(DESTDIR)$(bindir)/yum | ||
25 | + install -m 755 bin/yum-updatesd.py $(DESTDIR)$(sbindir)/yum-updatesd | ||
26 | |||
27 | - mkdir -p $(DESTDIR)/var/cache/yum | ||
28 | - mkdir -p $(DESTDIR)/var/lib/yum | ||
29 | + mkdir -p $(DESTDIR)$(localstatedir)/cache/yum | ||
30 | + mkdir -p $(DESTDIR)$(localstatedir)/lib/yum | ||
31 | |||
32 | for d in $(SUBDIRS); do make PYTHON=$(PYTHON) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done | ||
33 | |||
34 | Index: yum-3.2.18/docs/Makefile | ||
35 | =================================================================== | ||
36 | --- yum-3.2.18.orig/docs/Makefile 2008-08-23 09:19:07.000000000 +0100 | ||
37 | +++ yum-3.2.18/docs/Makefile 2008-08-23 09:19:37.000000000 +0100 | ||
38 | @@ -6,9 +6,9 @@ | ||
39 | rm -fr epydoc | ||
40 | |||
41 | install: | ||
42 | - mkdir -p $(DESTDIR)/usr/share/man/man{5,8} | ||
43 | - install -m 644 yum.8 $(DESTDIR)/usr/share/man/man8/yum.8 | ||
44 | - install -m 644 yum-shell.8 $(DESTDIR)/usr/share/man/man8/yum-shell.8 | ||
45 | - install -m 644 yum.conf.5 $(DESTDIR)/usr/share/man/man5/yum.conf.5 | ||
46 | - install -m 644 yum-updatesd.8 $(DESTDIR)/usr/share/man/man8/yum-updatesd.8 | ||
47 | - install -m 644 yum-updatesd.conf.5 $(DESTDIR)/usr/share/man/man5/yum-updatesd.conf.5 | ||
48 | + mkdir -p $(DESTDIR)$(mandir)/man{5,8} | ||
49 | + install -m 644 yum.8 $(DESTDIR)$(mandir)/man8/yum.8 | ||
50 | + install -m 644 yum-shell.8 $(DESTDIR)$(mandir)/man8/yum-shell.8 | ||
51 | + install -m 644 yum.conf.5 $(DESTDIR)$(mandir)/man5/yum.conf.5 | ||
52 | + install -m 644 yum-updatesd.8 $(DESTDIR)$(mandir)/man8/yum-updatesd.8 | ||
53 | + install -m 644 yum-updatesd.conf.5 $(DESTDIR)$(mandir)/man5/yum-updatesd.conf.5 | ||
54 | Index: yum-3.2.18/etc/Makefile | ||
55 | =================================================================== | ||
56 | --- yum-3.2.18.orig/etc/Makefile 2008-08-23 09:19:51.000000000 +0100 | ||
57 | +++ yum-3.2.18/etc/Makefile 2008-08-23 09:20:28.000000000 +0100 | ||
58 | @@ -5,20 +5,20 @@ | ||
59 | rm -f *.pyc *.pyo *~ | ||
60 | |||
61 | install: | ||
62 | - mkdir -p $(DESTDIR)/etc/yum/ | ||
63 | - mkdir -p $(DESTDIR)/etc/yum/repos.d | ||
64 | + mkdir -p $(DESTDIR)$(sysconfdir)/yum/ | ||
65 | + mkdir -p $(DESTDIR)$(sysconfdir)/yum/repos.d | ||
66 | |||
67 | - install -m 644 yum.conf $(DESTDIR)/etc/yum/yum.conf | ||
68 | + install -m 644 yum.conf $(DESTDIR)$(sysconfdir)/yum/yum.conf | ||
69 | |||
70 | - mkdir -p $(DESTDIR)/etc/logrotate.d | ||
71 | - install -m 644 yum.logrotate $(DESTDIR)/etc/logrotate.d/yum | ||
72 | + mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d | ||
73 | + install -m 644 yum.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/yum | ||
74 | |||
75 | - mkdir -p $(DESTDIR)/etc/rc.d/init.d | ||
76 | - install -m 755 yum-updatesd.init $(DESTDIR)/etc/rc.d/init.d/yum-updatesd | ||
77 | + mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d | ||
78 | + install -m 755 yum-updatesd.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/yum-updatesd | ||
79 | |||
80 | - mkdir -p $(DESTDIR)/etc/dbus-1/system.d/ | ||
81 | - install -m 755 yum-updatesd-dbus.conf $(DESTDIR)/etc/dbus-1/system.d/yum-updatesd.conf | ||
82 | + mkdir -p $(DESTDIR)$(sysconfdir)/dbus-1/system.d/ | ||
83 | + install -m 755 yum-updatesd-dbus.conf $(DESTDIR)$(sysconfdir)/dbus-1/system.d/yum-updatesd.conf | ||
84 | |||
85 | - install -m 755 yum-updatesd.conf $(DESTDIR)/etc/yum/yum-updatesd.conf | ||
86 | + install -m 755 yum-updatesd.conf $(DESTDIR)$(sysconfdir)/yum/yum-updatesd.conf | ||
87 | |||
88 | |||
diff --git a/meta/packages/yum/files/yum-install-recommends.py b/meta/packages/yum/files/yum-install-recommends.py new file mode 100755 index 0000000000..64716f2c3e --- /dev/null +++ b/meta/packages/yum/files/yum-install-recommends.py | |||
@@ -0,0 +1,39 @@ | |||
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 | |||