Author: sh-sh-sh
Date: Mon Jul 23 17:06:58 2007
New Revision: 39608
URL: http://svn.opensuse.org/viewcvs/yast?rev=39608&view=rev
Log:
merged ma's repo changes
Modified:
branches/tmp/sh/mod-ui/qt/src/pkg/YQPackageSelector.cc
branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.cc
branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.h
branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgPatchList.h
branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgTechnicalDetailsView.cc
branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgVersionsView.cc
branches/tmp/sh/mod-ui/qt/src/pkg/YQZypp.h
Modified: branches/tmp/sh/mod-ui/qt/src/pkg/YQPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/pkg/YQPackageSelector.cc?rev=39608&r1=39607&r2=39608&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/pkg/YQPackageSelector.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/pkg/YQPackageSelector.cc Mon Jul 23 17:06:58 2007
@@ -156,7 +156,7 @@
}
else if ( _searchFilterView )
{
- y2milestone( "No multiple inst sources - falling back to search mode" );
+ y2milestone( "No multiple repositories - falling back to search mode" );
_filters->showPage( _searchFilterView );
_searchFilterView->filter();
QTimer::singleShot( 0, _searchFilterView, SLOT( setFocus() ) );
@@ -363,12 +363,12 @@
//
- // Inst source view
+ // Repository view
//
_instSrcFilterView = new YQPkgInstSrcFilterView( parent );
CHECK_PTR( _instSrcFilterView );
- _filters->addPage( _( "Installation Sources" ), _instSrcFilterView );
+ _filters->addPage( _( "Repositories" ), _instSrcFilterView );
//
Modified: branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.cc?rev=39608&r1=39607&r2=39608&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.cc Mon Jul 23 17:06:58 2007
@@ -25,7 +25,7 @@
#include "YQi18n.h"
#include "utf8.h"
#include "YQPkgInstSrcList.h"
-#include
+#include
#include <algorithm>
using std::list;
@@ -37,7 +37,7 @@
YQPkgInstSrcList::YQPkgInstSrcList( QWidget * parent )
: QY2ListView( parent )
{
- y2debug( "Creating inst source list" );
+ y2debug( "Creating repository list" );
_nameCol = -1;
_urlCol = -1;
@@ -57,7 +57,7 @@
fillList();
selectSomething();
- y2debug( "Creating inst source list done" );
+ y2debug( "Creating repository list done" );
}
@@ -71,43 +71,23 @@
YQPkgInstSrcList::fillList()
{
clear();
- y2debug( "Filling inst source list" );
+ y2debug( "Filling repository list" );
- zypp::SourceManager_Ptr sourceManager = zypp::SourceManager::sourceManager();
- listzypp::SourceManager::SourceId sources = sourceManager->allSources();
-
- for ( listzypp::SourceManager::SourceId::const_iterator it = sources.begin();
- it != sources.end();
+ for ( ZyppRepositoryIterator it = ZyppRepositoriesBegin();
+ it != ZyppRepositoriesEnd();
++it )
{
- zypp::Source_Ref src = sourceManager->findSource( *it );
-
- if ( src && src.enabled() )
- addInstSrc( src );
+ addInstSrc( *it );
}
- y2debug( "Inst source list filled" );
+ y2debug( "Inst repository filled" );
}
int
YQPkgInstSrcList::countEnabledSources()
{
- int count = 0;
- zypp::SourceManager_Ptr sourceManager = zypp::SourceManager::sourceManager();
- listzypp::SourceManager::SourceId sources = sourceManager->allSources();
-
- for ( listzypp::SourceManager::SourceId::const_iterator it = sources.begin();
- it != sources.end();
- ++it )
- {
- zypp::Source_Ref src = sourceManager->findSource( *it );
-
- if ( src && src.enabled() )
- ++count;
- }
-
- return count;
+ return zyppPool().knownRepositoriesSize();
}
@@ -124,13 +104,13 @@
{
emit filterStart();
- y2milestone( "Collecting packages on selected installation sources..." );
+ y2milestone( "Collecting packages in selected repositories..." );
QTime stopWatch;
stopWatch.start();
//
- // Collect all packages on this inst source
+ // Collect all packages on this repository
//
set<ZyppSel> exactMatches;
@@ -153,7 +133,7 @@
++sel_it )
{
if ( (*sel_it)->candidateObj() &&
- (*sel_it)->candidateObj()->source() == currentSrc )
+ (*sel_it)->candidateObj()->repository() == currentSrc )
{
exactMatches.insert( *sel_it );
}
@@ -163,7 +143,7 @@
while ( pkg_it != (*sel_it)->availableEnd() )
{
- if ( (*pkg_it)->source() == currentSrc )
+ if ( (*pkg_it)->repository() == currentSrc )
nearMatches.insert( *sel_it );
++pkg_it;
@@ -177,7 +157,7 @@
item = item->nextSibling();
}
-
+
//
// Send all exact matches to the list
// (emit a filterMatch signal for each one)
@@ -257,7 +237,12 @@
if ( urlCol() >= 0 )
{
- setText( urlCol(), src.url().asString().c_str() );
+ zypp::Url srcUrl;
+
+ if ( ! src.info().baseUrlsEmpty() )
+ srcUrl = *src.info().baseUrlsBegin();
+
+ setText( urlCol(), srcUrl.asString().c_str() );
}
}
@@ -277,7 +262,7 @@
zypp::ResStore::iterator it = zyppSrc.resolvables().begin();
//
- // Find the first product on this inst src
+ // Find the first product on this repository
//
while ( it != zyppSrc.resolvables().end() && ! product )
@@ -287,15 +272,15 @@
}
//
- // Check if there is another product on this inst src
+ // Check if there is another product on this repository
//
while ( it != zyppSrc.resolvables().end() )
{
if ( zypp::dynamic_pointer_castzypp::Product( *it ) )
{
- y2milestone( "Multiple products on installation source %s",
- zyppSrc.alias().c_str() );
+ y2milestone( "Multiple products in repository %s",
+ zyppSrc.info().alias().c_str() );
ZyppProduct null;
return null;
}
@@ -304,8 +289,8 @@
}
if ( ! product )
- y2milestone( "No product on installation source %s",
- zyppSrc.alias().c_str() );
+ y2milestone( "No product in repository %s",
+ zyppSrc.info().alias().c_str() );
return product;
}
Modified: branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.h?rev=39608&r1=39607&r2=39608&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgInstSrcList.h Mon Jul 23 17:06:58 2007
@@ -22,13 +22,13 @@
#include "YQZypp.h"
#include "QY2ListView.h"
-#include
+#include
#include
class YQPkgInstSrcListItem;
-typedef zypp::Source_Ref ZyppSrc;
+typedef zypp::Repository ZyppSrc;
/**
@@ -76,8 +76,8 @@
* Add an inst source to the list.
**/
void addInstSrc( ZyppSrc src );
-
-
+
+
public:
// Column numbers
@@ -85,7 +85,7 @@
int nameCol() const { return _nameCol; }
int urlCol() const { return _urlCol; }
-
+
/**
* Returns the currently selected item or 0 if there is none.
**/
@@ -136,7 +136,7 @@
int _nameCol;
int _urlCol;
-
+
};
Modified: branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgPatchList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgPatchList.h?rev=39608&r1=39607&r2=39608&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgPatchList.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgPatchList.h Mon Jul 23 17:06:58 2007
@@ -63,7 +63,7 @@
**/
virtual ~YQPkgPatchList();
-
+
enum FilterCriteria
{
RelevantPatches, // needed + broken
@@ -289,7 +289,7 @@
**/
virtual void applyChanges();
-
+
// Data members
YQPkgPatchList * _patchList;
Modified: branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgTechnicalDetailsView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgTechnicalDetailsView.cc?rev=39608&r1=39607&r2=39608&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgTechnicalDetailsView.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgTechnicalDetailsView.cc Mon Jul 23 17:06:58 2007
@@ -133,7 +133,7 @@
row( hcell( _( "Package Group:" ) ) + cell( formatRpmGroup( pkg ) ) ) +
row( hcell( _( "License:" ) ) + cell( pkg->license() ) ) +
row( hcell( _( "Installed Size:" ) ) + cell( pkg->size().asString() ) ) +
- row( hcell( _( "Archive Size:" ) ) + cell( pkg->archivesize().asString() ) ) +
+ row( hcell( _( "Download Size:" ) ) + cell( pkg->downloadSize().asString() ) ) +
row( hcell( _( "Distribution:" ) ) + cell( pkg->distribution() ) ) +
row( hcell( _( "Vendor:" ) ) + cell( pkg->vendor() ) ) +
row( hcell( _( "Packager:" ) ) + cell( pkg->packager() ) ) +
@@ -144,7 +144,7 @@
#ifdef FIXME_missing_in_zypp
row( hcell( _( "Source RPM:" ) ) + cell( pkg->sourceloc() ) ) +
#endif
- row( hcell( _( "Media No.:" ) ) + cell( pkg->sourceMediaNr() ) ) +
+ row( hcell( _( "Media No.:" ) ) + cell( pkg->mediaNr() ) ) +
row( hcell( _( "Authors:" ) ) + authorsListCell( pkg ) )
);
@@ -173,7 +173,7 @@
row( hcell( _( "Package Group:" ) ) + cell( formatRpmGroup( p1 ) ) + cell( formatRpmGroup( p2 ) ) ) +
row( hcell( _( "License:" ) ) + cell( p1->license() ) + cell( p2->license() ) ) +
row( hcell( _( "Installed Size:" ) ) + cell( p1->size().asString() ) + cell( p2->size().asString() ) ) +
- row( hcell( _( "Archive Size:" ) ) + cell( p1->archivesize().asString() ) + cell( p2->archivesize().asString() ) ) +
+ row( hcell( _( "Download Size:" ) ) + cell( p1->downloadSize().asString() ) + cell( p2->downloadSize().asString() ) ) +
row( hcell( _( "Distribution:" ) ) + cell( p1->distribution() ) + cell( p2->distribution() ) ) +
row( hcell( _( "Vendor:" ) ) + cell( p1->vendor() ) + cell( p2->vendor() ) ) +
row( hcell( _( "Packager:" ) ) + cell( p1->packager() ) + cell( p2->packager() ) ) +
@@ -184,7 +184,7 @@
#ifdef FIXME_missing_in_zypp
row( hcell( _( "Source RPM:" ) ) + cell( p1->sourceloc() ) + cell( p2->sourceloc() ) ) +
#endif
- row( hcell( _( "Media No.:" ) ) + cell( p1->sourceMediaNr() ) + cell( p2->sourceMediaNr() ) ) +
+ row( hcell( _( "Media No.:" ) ) + cell( p1->mediaNr() ) + cell( p2->mediaNr() ) ) +
row( hcell( _( "Authors:" ) ) + authorsListCell( p1 ) + authorsListCell( p2 ) )
);
Modified: branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgVersionsView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgVersionsView.cc?rev=39608&r1=39607&r2=39608&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgVersionsView.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/pkg/YQPkgVersionsView.cc Mon Jul 23 17:06:58 2007
@@ -21,7 +21,7 @@
#define y2log_component "qt-pkg"
#include
-#include
+#include
#include
#include
#include
@@ -51,11 +51,11 @@
_summaryCol = -42;
int numCol = 0;
- addColumn( _( "Version" ) ); _versionCol = numCol++;
- addColumn( _( "Arch." ) ); _archCol = numCol++;
- addColumn( _( "Product" ) ); _productCol = numCol++;
- addColumn( _( "Installation Source" ) ); _instSrcCol = numCol++;
- addColumn( _( "URL" ) ); _urlCol = numCol++;
+ addColumn( _( "Version" ) ); _versionCol = numCol++;
+ addColumn( _( "Arch." ) ); _archCol = numCol++;
+ addColumn( _( "Product" ) ); _productCol = numCol++;
+ addColumn( _( "Repository" ) ); _instSrcCol = numCol++;
+ addColumn( _( "URL" ) ); _urlCol = numCol++;
_statusCol = _productCol;
_nameCol = _versionCol;
@@ -248,17 +248,22 @@
if ( versionCol() >= 0 ) setText( versionCol(), zyppObj->edition().asString().c_str() );
if ( archCol() >= 0 ) setText( archCol(), zyppObj->arch().asString().c_str() );
- if ( instSrcCol() >= 0 ) setText( instSrcCol(), zyppObj->source().alias().c_str() );
+ if ( instSrcCol() >= 0 ) setText( instSrcCol(), zyppObj->repository().info().alias().c_str() );
if ( productCol() >= 0 )
{
- ZyppProduct product = YQPkgInstSrcListItem::singleProduct( zyppObj->source() );
+ ZyppProduct product = YQPkgInstSrcListItem::singleProduct( zyppObj->repository() );
if ( product )
setText( productCol(), product->summary() );
}
if ( urlCol() >= 0 )
{
- setText( urlCol(), zyppObj->source().url().asString().c_str() );
+ zypp::Url srcUrl;
+
+ if ( ! zyppObj->repository().info().baseUrlsEmpty() )
+ srcUrl = *zyppObj->repository().info().baseUrlsBegin();
+
+ setText( urlCol(), srcUrl.asString().c_str() );
}
if ( _selectable->hasInstalledObj() )
Modified: branches/tmp/sh/mod-ui/qt/src/pkg/YQZypp.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/pkg/YQZypp.h?rev=39608&r1=39607&r2=39608&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/pkg/YQZypp.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/pkg/YQZypp.h Mon Jul 23 17:06:58 2007
@@ -34,16 +34,16 @@
#include
-using zypp::ui::S_Protected;
-using zypp::ui::S_Taboo;
-using zypp::ui::S_Del;
-using zypp::ui::S_Update;
-using zypp::ui::S_Install;
-using zypp::ui::S_AutoDel;
-using zypp::ui::S_AutoUpdate;
-using zypp::ui::S_AutoInstall;
-using zypp::ui::S_KeepInstalled;
-using zypp::ui::S_NoInst;
+using zypp::ui::S_Protected;
+using zypp::ui::S_Taboo;
+using zypp::ui::S_Del;
+using zypp::ui::S_Update;
+using zypp::ui::S_Install;
+using zypp::ui::S_AutoDel;
+using zypp::ui::S_AutoUpdate;
+using zypp::ui::S_AutoInstall;
+using zypp::ui::S_KeepInstalled;
+using zypp::ui::S_NoInst;
//
@@ -62,7 +62,7 @@
typedef zypp::ResPoolProxy ZyppPool;
typedef zypp::ResPoolProxy::const_iterator ZyppPoolIterator;
-
+typedef zypp::ResPoolProxy::repository_iterator ZyppRepositoryIterator;
inline ZyppPool zyppPool() { return zypp::getZYpp()->poolProxy(); }
@@ -87,6 +87,8 @@
inline ZyppPoolIterator zyppProductsBegin() { return zyppBeginzypp::Product(); }
inline ZyppPoolIterator zyppProductsEnd() { return zyppEndzypp::Product(); }
+inline ZyppRepositoryIterator ZyppRepositoriesBegin() { return zyppPool().knownRepositoriesBegin(); }
+inline ZyppRepositoryIterator ZyppRepositoriesEnd() { return zyppPool().knownRepositoriesEnd(); }
inline ZyppPkg tryCastToZyppPkg( ZyppObj zyppObj )
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org