autounmask: Always use unresticted atoms for license and USE changes
authorSebastian Luther <SebastianLuther@gmx.de>
Wed, 21 Sep 2011 12:23:44 +0000 (14:23 +0200)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Sep 2011 14:00:35 +0000 (07:00 -0700)
See bug 379333.

man/emerge.1
pym/_emerge/depgraph.py
pym/_emerge/help.py

index 72b556966ee19c038f99d719873fe52927cd48df..6d9ce4c44ed68f0a60329c1cb01e14ac931974dc 100644 (file)
@@ -305,9 +305,10 @@ the specified configuration file(s), or enable the
 disable this option by default in \fBmake.conf\fR(5).
 .TP
 .BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]"
-If \-\-autounmask is enabled, changes using the \'=\' operator
-will be written. With this option, \'>=\' operators will be used
-whenever possible.
+If \-\-autounmask is enabled, keyword and mask changes
+using the \'=\' operator will be written. With this
+option, \'>=\' operators will be used whenever possible.
+USE and license changes always use the latter behvior.
 .TP
 .BR "\-\-autounmask\-keep\-masks [ y | n ]"
 If \-\-autounmask is enabled, no package.unmask or ** keyword changes
index 8b2bfd378c6a36609a0f28aab3e4c5f83d766c92..ffa7e167e5f5a52007b3624d09cd49b1fd9614a2 100644 (file)
@@ -5848,13 +5848,10 @@ class depgraph(object):
                                        else:
                                                adjustments.append("-" + flag)
                                use_changes_msg[root].append(self._get_dep_chain_as_comment(pkg, unsatisfied_dependency=True))
-                               if autounmask_unrestricted_atoms:
-                                       if is_latest:
-                                               use_changes_msg[root].append(">=%s %s\n" % (pkg.cpv, " ".join(adjustments)))
-                                       elif is_latest_in_slot:
-                                               use_changes_msg[root].append(">=%s:%s %s\n" % (pkg.cpv, pkg.metadata["SLOT"], " ".join(adjustments)))
-                                       else:
-                                               use_changes_msg[root].append("=%s %s\n" % (pkg.cpv, " ".join(adjustments)))
+                               if is_latest:
+                                       use_changes_msg[root].append(">=%s %s\n" % (pkg.cpv, " ".join(adjustments)))
+                               elif is_latest_in_slot:
+                                       use_changes_msg[root].append(">=%s:%s %s\n" % (pkg.cpv, pkg.metadata["SLOT"], " ".join(adjustments)))
                                else:
                                        use_changes_msg[root].append("=%s %s\n" % (pkg.cpv, " ".join(adjustments)))
 
@@ -5868,13 +5865,10 @@ class depgraph(object):
                                is_latest, is_latest_in_slot = check_if_latest(pkg)
 
                                license_msg[root].append(self._get_dep_chain_as_comment(pkg))
-                               if autounmask_unrestricted_atoms:
-                                       if is_latest:
-                                               license_msg[root].append(">=%s %s\n" % (pkg.cpv, " ".join(sorted(missing_licenses))))
-                                       elif is_latest_in_slot:
-                                               license_msg[root].append(">=%s:%s %s\n" % (pkg.cpv, pkg.metadata["SLOT"], " ".join(sorted(missing_licenses))))
-                                       else:
-                                               license_msg[root].append("=%s %s\n" % (pkg.cpv, " ".join(sorted(missing_licenses))))
+                               if is_latest:
+                                       license_msg[root].append(">=%s %s\n" % (pkg.cpv, " ".join(sorted(missing_licenses))))
+                               elif is_latest_in_slot:
+                                       license_msg[root].append(">=%s:%s %s\n" % (pkg.cpv, pkg.metadata["SLOT"], " ".join(sorted(missing_licenses))))
                                else:
                                        license_msg[root].append("=%s %s\n" % (pkg.cpv, " ".join(sorted(missing_licenses))))
 
index e6828c0f4cc68d8a1d3fba427459c1e3d55f2334..7e73ec0672eef92d0d2a2b94800adf6b1dd69816 100644 (file)
@@ -325,9 +325,10 @@ def help(myopts, havecolor=1):
                print()
                print("       " + green("--autounmask-unrestricted-atoms") + " [ %s | %s ]" % \
                        (turquoise("y"), turquoise("n")))
-               desc = "If --autounmask is enabled, changes using the '=' operator " + \
-                       "will be written. With this option, '>=' operators will be used " + \
-                       "whenever possible."
+               desc = "If --autounmask is enabled, keyword and mask changes" + \
+                       "using the '=' operator will be written. With this option, " + \
+                       "'>=' operators will be used whenever possible. USE and " + \
+                       "license changes always use the latter behvior."
                for line in wrap(desc, desc_width):
                        print(desc_indent + line)
                print()