Skip to main content

Source code file content

Revision: 44

webrev for 15648766 pkg list -u claims no such package installed when there are simply
» Project Revision History

» Checkout URL

website-repo / webrev / tk241774 / 15648766-4 / src / client.py.udiff.html

Size: 5859 bytes, 1 line
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><meta http-equiv="cache-control" content="no-cache"></meta>
<meta http-equiv="Pragma" content="no-cache"></meta>
<meta http-equiv="Expires" content="-1"></meta>
<!--
   Note to customizers: the body of the webrev is IDed as SUNWwebrev
   to allow easy overriding by users of webrev via the userContent.css
   mechanism available in some browsers.

   For example, to have all "removed" information be red instead of
   brown, set a rule in your userContent.css file like:

       body#SUNWwebrev span.removed { color: red ! important; }
-->
<style type="text/css" media="screen">
body {
    background-color: #eeeeee;
}
hr {
    border: none 0;
    border-top: 1px solid #aaa;
    height: 1px;
}
div.summary {
    font-size: .8em;
    border-bottom: 1px solid #aaa;
    padding-left: 1em;
    padding-right: 1em;
}
div.summary h2 {
    margin-bottom: 0.3em;
}
div.summary table th {
    text-align: right;
    vertical-align: top;
    white-space: nowrap;
}
span.lineschanged {
    font-size: 0.7em;
}
span.oldmarker {
    color: red;
    font-size: large;
    font-weight: bold;
}
span.newmarker {
    color: green;
    font-size: large;
    font-weight: bold;
}
span.removed {
    color: brown;
}
span.changed {
    color: blue;
}
span.new {
    color: blue;
    font-weight: bold;
}
span.chmod {
    font-size: 0.7em;
    color: #db7800;
}
a.print { font-size: x-small; }
a:hover { background-color: #ffcc99; }
</style>

<style type="text/css" media="print">
pre { font-size: 0.8em; font-family: courier, monospace; }
span.removed { color: #444; font-style: italic }
span.changed { font-weight: bold; }
span.new { font-weight: bold; }
span.newmarker { font-size: 1.2em; font-weight: bold; }
span.oldmarker { font-size: 1.2em; font-weight: bold; }
a.print {display: none}
hr { border: none 0; border-top: 1px solid #aaa; height: 1px; }
</style>

<title>pkglist_u_only Udiff src/client.py</title>

<style type="text/css" media="screen">
span.new {
    color: blue;
    font-weight: normal;
}
</style>

</head>
<body id="SUNWwebrev">
        <a class="print" href="javascript:print()">Print this page</a>
<pre><a href="https://bug.oraclecorp.com/show?15648766">15648766</a> pkg list -u claims no such package installed when there are simply</pre>
        <pre>
</pre><hr></hr><pre>
<span class="newmarker">@@ -616,14 +616,39 @@</span>
                             "installed incorporations, or image variants that "
                             "are known or installed") % \
                             ", ".join(e.notfound), cmd=op)
                         logger.error("Use -af to allow all versions.")
                 elif pkg_list == api.ImageInterface.LIST_UPGRADABLE:
<span class="removed">-                        error(_("no packages matching '%s' are installed "</span>
<span class="removed">-                            "and have newer versions available") % \</span>
<span class="removed">-                            ", ".join(e.notfound), cmd=op)</span>
<span class="new">+                        # Creating a list of packages that are uptodate</span>
<span class="new">+                        # and that are not installed on the system.</span>
<span class="new">+                        img = api_inst._img</span>
<span class="new">+                        cat = img.get_catalog(img.IMG_CATALOG_INSTALLED)</span>
<span class="new">+                        pkgnomatch = []</span>
<span class="new">+                        pkguptodate = []</span>
<span class="new">+                        for p in pargs:</span>
<span class="new">+                                if list(cat.gen_packages(patterns=[p])):</span>
<span class="new">+                                        pkguptodate.append(p)</span>
                 else:
<span class="new">+                                        pkgnomatch.append(p)</span>
<span class="new">+                        if pkgnomatch:</span>
<span class="new">+                                if len(pkgnomatch) == 1:</span>
<span class="new">+                                        error(_("no package matching '%s'" \</span>
<span class="new">+                                            " is installed.") % \</span>
<span class="new">+                                            pkgnomatch[0], cmd=op)</span>
<span class="new">+                                else:</span>
<span class="new">+                                        error(_("no packages matching '%s'" \</span>
<span class="new">+                                            " are installed.") % \</span>
<span class="new">+                                            ", ".join(pkgnomatch), cmd=op)</span>
<span class="new">+                        if pkguptodate:</span>
<span class="new">+                                if len(pkguptodate) == 1:</span>
<span class="new">+                                        error(_("package '%s' is up-to-date.") %</span>
<span class="new">+                                            pkguptodate[0], cmd="list")</span>
<span class="new">+                                else:</span>
<span class="new">+                                        error(_("packages '%s'"</span>
<span class="new">+                                            " are up-to-date.") %</span>
<span class="new">+                                            ", ".join(pkguptodate), cmd="list")</span>
<span class="new">+                else:</span>
                         error(_("no packages matching '%s' installed") % \
                             ", ".join(e.notfound), cmd=op)
 
                 if found and e.notfound:
                         # Only some patterns matched.
</pre></body></html>

 
 
Close
loading
Please Confirm
Close