--- Remote.php	2007-05-28 22:32:45.000000000 +0200
+++ Remote_listupgrades.php	2007-05-28 22:39:55.000000000 +0200
@@ -58,7 +58,12 @@
             'summary' => 'List Available Upgrades',
             'function' => 'doListUpgrades',
             'shortcut' => 'lu',
-            'options' => array(),
+            'options' => array(
+                'channelinfo' => array(
+                    'shortopt' => 'i',
+                    'doc' => 'output fully channel-aware data, even on failure',
+                    ),
+                ),
             'doc' => '[preferred_state]
 List releases on the server of packages you have installed where
 a newer version is available with the same release state (stable etc.)
@@ -625,9 +630,21 @@
                 }
                 $data['data'][] = array($channel, $pkg, "$inst_version ($inst_state)", "$version ($state)", $fs);
             }
-            if (empty($data['data'])) {
-                $this->ui->outputData('Channel ' . $channel . ': No upgrades available');
+            if (!isset($options['channelinfo']) || $options['channelinfo'] != true) {
+                if (empty($data['data'])) {
+                    $this->ui->outputData('Channel ' . $channel . ': No upgrades available');
+                } else {
+                    $this->ui->outputData($data, $command);
+                }
             } else {
+                if (empty($data['data'])) {
+                    unset($data['headline']);
+                    if (count($inst) == 0) {
+                        $data['data'] = '(no packages installed)';
+                    } else {
+                        $data['data'] = '(no upgrades available)';
+                    }
+                }
                 $this->ui->outputData($data, $command);
             }
         }
