only show alias if it is different from the url
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 6 Sep 2006 15:56:31 +0000 (15:56 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 6 Sep 2006 15:56:31 +0000 (15:56 +0000)
tools/zmart/zmart-sources.cc

index 4124852..b5b8f55 100644 (file)
@@ -80,7 +80,10 @@ void list_system_sources()
     SourceInfo source = *it;
     cout << ( source.enabled() ? "[x]" : "[ ]" );
     cout << ( source.autorefresh() ? "* " : "  " );
-    cout << source.alias() << " (" << source.url() << ")" << endl;
+    if ( source.alias() != source.url().asString() )
+      cout << source.alias() << " (" << source.url() << ")" << endl;
+    else
+      cout << source.url() << endl;
   }
     
   /*