prt-get: promote compareShadowPair
git-svn-id: https://crux.nu/svn/tools/prt-get/trunk@1839 0b5ae1c7-2405-0410-a7fc-ba219f786e1e
This commit is contained in:
parent
35154af881
commit
917e7a20f5
@ -64,10 +64,10 @@ const map<string, Package*>& Repository::packages() const
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns a map of duplicate packages in the repository. The key is the name
|
Returns a sorted list of duplicate packages in the repository.
|
||||||
of the package, the value a pair where \a first the shadowed port and
|
In the pairs \a first is the shadowed port and
|
||||||
\a second is the port which preceeds over \a first
|
\a second is the port which preceeds over \a first
|
||||||
\return a map of duplicate packages in the repository
|
\return a list of duplicate packages in the repository
|
||||||
*/
|
*/
|
||||||
const list< pair<Package*, Package*> >& Repository::shadowedPackages() const
|
const list< pair<Package*, Package*> >& Repository::shadowedPackages() const
|
||||||
{
|
{
|
||||||
@ -140,7 +140,8 @@ void Repository::searchMatchingPackages( const string& pattern,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int compareShadowPair(pair<Package*, Package*>& p1, pair<Package*, Package*>& p2)
|
int Repository::compareShadowPair(pair<Package*, Package*>& p1,
|
||||||
|
pair<Package*, Package*>& p2)
|
||||||
{
|
{
|
||||||
return p1.second->name() < p2.second->name();
|
return p1.second->name() < p2.second->name();
|
||||||
}
|
}
|
||||||
@ -231,7 +232,8 @@ void Repository::initFromFS( const list< pair<string, string> >& rootList,
|
|||||||
// no such package found, add
|
// no such package found, add
|
||||||
m_packageMap[name] = p;
|
m_packageMap[name] = p;
|
||||||
} else if ( listDuplicate ) {
|
} else if ( listDuplicate ) {
|
||||||
m_shadowedPackages.push_back(make_pair( p, hidden->second ));
|
m_shadowedPackages.push_back(
|
||||||
|
make_pair( p, hidden->second ));
|
||||||
} else {
|
} else {
|
||||||
delete p;
|
delete p;
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,9 @@ public:
|
|||||||
static const std::string EXTERNAL_DEPENDENCY_FILE;
|
static const std::string EXTERNAL_DEPENDENCY_FILE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static int compareShadowPair(pair<Package*, Package*>& p1,
|
||||||
|
pair<Package*, Package*>& p2);
|
||||||
|
|
||||||
static const std::string CACHE_VERSION;
|
static const std::string CACHE_VERSION;
|
||||||
bool m_useRegex;
|
bool m_useRegex;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user