Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/portage/util/
Date: Mon, 29 Aug 2011 16:23:49
Message-Id: a37eb8ebd2fad3f8074490a061f067e2c637f05d.zmedico@gentoo
1 commit: a37eb8ebd2fad3f8074490a061f067e2c637f05d
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 29 16:22:17 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 29 16:22:17 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a37eb8eb
7
8 env_update: always respect makelinks=False
9
10 This ensures that the env-update --no-ldconfig option is always
11 respected. Also, in order to preserve behavior during downgrades for
12 an env_update call in vartree.py, remove the makelinks=False for
13 downgrades since it wasn't respected anyway when lib path mtimes had
14 changed, and we don't want it to behave differently in this case now
15 that makelinks=False is always respected. Note that the unconditional
16 use of the ldconfig -X option (from bug #373341) since commit
17 e1347f9c0dd5ef5ff1a50d6b136b0648efb8a6ca may also come into play for
18 downgrades.
19
20 ---
21 pym/portage/dbapi/vartree.py | 2 +-
22 pym/portage/util/env_update.py | 11 ++++-------
23 2 files changed, 5 insertions(+), 8 deletions(-)
24
25 diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
26 index 6281f7e..afcbceb 100644
27 --- a/pym/portage/dbapi/vartree.py
28 +++ b/pym/portage/dbapi/vartree.py
29 @@ -3815,7 +3815,7 @@ class dblink(object):
30 self.vartree.dbapi._fs_lock()
31 try:
32 #update environment settings, library paths. DO NOT change symlinks.
33 - env_update(makelinks=(not downgrade),
34 + env_update(
35 target_root=self.settings['ROOT'], prev_mtimes=prev_mtimes,
36 contents=contents, env=self.settings,
37 writemsg_level=self._display_merge)
38
39 diff --git a/pym/portage/util/env_update.py b/pym/portage/util/env_update.py
40 index c670ded..1731663 100644
41 --- a/pym/portage/util/env_update.py
42 +++ b/pym/portage/util/env_update.py
43 @@ -147,7 +147,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
44 raise
45 oldld = None
46
47 - ld_cache_update=False
48 + ldsoconf_update = False
49
50 newld = specials["LDPATH"]
51 if (oldld != newld):
52 @@ -158,7 +158,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
53 for x in specials["LDPATH"]:
54 myfd.write(x + "\n")
55 myfd.close()
56 - ld_cache_update=True
57 + ldsoconf_update = True
58
59 # Update prelink.conf if we are prelink-enabled
60 if prelink_capable:
61 @@ -229,11 +229,8 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
62 prev_mtimes[x] = newldpathtime
63 mtime_changed = True
64
65 - if mtime_changed:
66 - ld_cache_update = True
67 -
68 if makelinks and \
69 - not ld_cache_update and \
70 + not mtime_changed and \
71 contents is not None:
72 libdir_contents_changed = False
73 for mypath, mydata in contents.items():
74 @@ -252,7 +249,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
75 ldconfig = find_binary("%s-ldconfig" % settings["CHOST"])
76
77 # Only run ldconfig as needed
78 - if (ld_cache_update or makelinks) and ldconfig and not eprefix:
79 + if makelinks and ldconfig and not eprefix:
80 # ldconfig has very different behaviour between FreeBSD and Linux
81 if ostype == "Linux" or ostype.lower().endswith("gnu"):
82 # We can't update links if we haven't cleaned other versions first, as