prt-get: hidden within trailing whitespace removals, a fix for aliases in deptree
git-svn-id: https://crux.nu/svn/tools/prt-get/trunk@1179 0b5ae1c7-2405-0410-a7fc-ba219f786e1e
This commit is contained in:
parent
5634324b65
commit
a4a40a4b02
@ -11,6 +11,7 @@
|
||||
- Make 'cat' and 'readme' use $PAGER if set
|
||||
- update default prt-get.conf to reflect new port hierarchy (core/opt/contrib)
|
||||
- add timestamps to log files
|
||||
- fix aliasing bug introduce earlier in the .12 session (thanks Mark)
|
||||
|
||||
* 0.5.11 29.05.2005 Johannes Winkelmann
|
||||
- add --path to 'ls'
|
||||
|
@ -55,7 +55,7 @@ bool PkgDB::isInstalled( const string& name,
|
||||
if ( !load() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool installed = m_packages.find( name ) != m_packages.end();
|
||||
if (!installed && useAlias) {
|
||||
string provider;
|
||||
@ -68,6 +68,10 @@ bool PkgDB::isInstalled( const string& name,
|
||||
*aliasOrignalName = provider;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isAlias) {
|
||||
*isAlias = false;
|
||||
}
|
||||
}
|
||||
|
||||
return installed;
|
||||
@ -81,13 +85,13 @@ bool PkgDB::aliasExistsFor(const string& name, string& providerName) const
|
||||
map<string, string>::iterator it = m_aliases.begin();
|
||||
for (; it != m_aliases.end(); ++it) {
|
||||
StringHelper::split(it->second, ',',
|
||||
m_splitAliases[it->first]);
|
||||
m_splitAliases[it->first]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
map<string, vector<string> >::iterator it = m_splitAliases.begin();
|
||||
for (; it != m_splitAliases.end(); ++it) {
|
||||
if (find(it->second.begin(), it->second.end(), name) !=
|
||||
if (find(it->second.begin(), it->second.end(), name) !=
|
||||
it->second.end()) {
|
||||
providerName = it->first;
|
||||
return true;
|
||||
|
@ -1225,12 +1225,12 @@ bool PrtGet::printFile(const string& file)
|
||||
if (!File::fileExists(file)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
char* pager = getenv("PAGER");
|
||||
if (pager) {
|
||||
Process proc(pager, file);
|
||||
proc.executeShell();
|
||||
} else {
|
||||
} else {
|
||||
FILE* fp = fopen( file.c_str(), "r" );
|
||||
char buf[255];
|
||||
if ( fp ) {
|
||||
@ -1240,7 +1240,7 @@ bool PrtGet::printFile(const string& file)
|
||||
fclose( fp );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user