Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9622 - in main/branches/2.1.2: bin pym
Date: Sun, 30 Mar 2008 06:33:27
Message-Id: E1Jfr6Z-0001mr-Tg@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-03-30 06:33:22 +0000 (Sun, 30 Mar 2008)
3 New Revision: 9622
4
5 Modified:
6 main/branches/2.1.2/bin/emerge
7 main/branches/2.1.2/pym/portage.py
8 Log:
9 Move the AUTOCLEAN code into dblink.treewalk since it's already partially
10 supported there anyway (for replacement of identical cpv). This has the
11 benefit of guaranteeing that the order of installation and removal phases
12 is always the same. (trunk r9621)
13
14
15 Modified: main/branches/2.1.2/bin/emerge
16 ===================================================================
17 --- main/branches/2.1.2/bin/emerge 2008-03-30 06:18:15 UTC (rev 9621)
18 +++ main/branches/2.1.2/bin/emerge 2008-03-30 06:33:22 UTC (rev 9622)
19 @@ -4450,19 +4450,6 @@
20 if "--pretend" not in self.myopts and \
21 "--fetchonly" not in self.myopts and \
22 "--fetch-all-uri" not in self.myopts:
23 - # Clean the old package that we have merged over top of it.
24 - if pkgsettings.get("AUTOCLEAN", "yes") == "yes":
25 - xsplit=portage.pkgsplit(x[2])
26 - emergelog(xterm_titles, " >>> AUTOCLEAN: " + xsplit[0])
27 - retval = unmerge(pkgsettings, self.myopts, vartree,
28 - "clean", [xsplit[0]], ldpath_mtimes, autoclean=1)
29 - if not retval:
30 - emergelog(xterm_titles,
31 - " --- AUTOCLEAN: Nothing unmerged.")
32 - else:
33 - portage.writemsg_stdout(colorize("WARN", "WARNING:")
34 - + " AUTOCLEAN is disabled. This can cause serious"
35 - + " problems due to overlapping packages.\n")
36
37 # Figure out if we need a restart.
38 mysplit=portage.pkgsplit(x[2])
39
40 Modified: main/branches/2.1.2/pym/portage.py
41 ===================================================================
42 --- main/branches/2.1.2/pym/portage.py 2008-03-30 06:18:15 UTC (rev 9621)
43 +++ main/branches/2.1.2/pym/portage.py 2008-03-30 06:33:22 UTC (rev 9622)
44 @@ -9219,11 +9219,11 @@
45 "portage" == pkgsplit(self.pkg)[0]:
46 reinstall_self = True
47
48 + autoclean = self.settings.get("AUTOCLEAN", "yes") == "yes"
49 for dblnk in list(others_in_slot):
50 if dblnk is self:
51 continue
52 - if dblnk.mycpv != self.mycpv and \
53 - not reinstall_self:
54 + if not (autoclean or dblnk.mycpv == self.mycpv or reinstall_self):
55 continue
56 writemsg_stdout(">>> Safely unmerging already-installed instance...\n")
57 others_in_slot.remove(dblnk) # dblnk will unmerge itself now
58 @@ -9232,9 +9232,12 @@
59 # TODO: Check status and abort if necessary.
60 dblnk.delete()
61 writemsg_stdout(">>> Original instance of package unmerged safely.\n")
62 - if not reinstall_self:
63 - break
64
65 + if len(others_in_slot) > 1:
66 + writemsg_stdout(colorize("WARN", "WARNING:")
67 + + " AUTOCLEAN is disabled. This can cause serious"
68 + + " problems due to overlapping packages.\n")
69 +
70 # We hold both directory locks.
71 self.dbdir = self.dbpkgdir
72 self.delete()
73
74 --
75 gentoo-commits@l.g.o mailing list