fix printf when used with --regex
strip parentheses from the Optionals line replace deprecated autotools commands in INSTALL
This commit is contained in:
parent
d9ec1c1e98
commit
dad928b20f
7
INSTALL
7
INSTALL
@ -1,6 +1,7 @@
|
|||||||
Installing prt-get
|
Installing prt-get
|
||||||
------------------
|
------------------
|
||||||
Installing prt-get is just a matter of
|
Installing prt-get is just a matter of
|
||||||
./configure
|
|
||||||
make
|
meson setup bld --prefix=/usr
|
||||||
make install
|
cd bld && meson compile
|
||||||
|
meson install
|
||||||
|
@ -213,50 +213,16 @@ void Package::load() const
|
|||||||
|
|
||||||
StringHelper::replaceAll( softdeps, " ", "," );
|
StringHelper::replaceAll( softdeps, " ", "," );
|
||||||
StringHelper::replaceAll( softdeps, ",,", "," );
|
StringHelper::replaceAll( softdeps, ",,", "," );
|
||||||
|
StringHelper::replaceAll( softdeps, "(", "" );
|
||||||
|
StringHelper::replaceAll( softdeps, ")", "" );
|
||||||
|
|
||||||
// TODO: decide which one to use
|
|
||||||
#if 0
|
|
||||||
// remove commented out packages
|
|
||||||
list<string> softDepList = StringHelper::split( softdeps, ',' );
|
|
||||||
list<string>::iterator it = deps.begin();
|
|
||||||
for ( ; it != softDepList.end(); ++it ) {
|
|
||||||
if ( (*it)[0] == '#' ) {
|
|
||||||
cerr << "Commented dep: " << *it << endl;
|
|
||||||
} else {
|
|
||||||
if ( it != softDepsList.begin() ) {
|
|
||||||
m_data->optionals += ",";
|
|
||||||
}
|
|
||||||
m_data->optionals += *it;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
m_data->optionals = softdeps;
|
m_data->optionals = softdeps;
|
||||||
#endif
|
|
||||||
} else if ( startsWithNoCase( line, "dep" ) ) {
|
} else if ( startsWithNoCase( line, "dep" ) ) {
|
||||||
string depends = stripWhiteSpace( getValue( line, ':' ) );
|
string depends = stripWhiteSpace( getValue( line, ':' ) );
|
||||||
|
|
||||||
StringHelper::replaceAll( depends, " ", "," );
|
StringHelper::replaceAll( depends, " ", "," );
|
||||||
StringHelper::replaceAll( depends, ",,", "," );
|
StringHelper::replaceAll( depends, ",,", "," );
|
||||||
|
|
||||||
// TODO: decide which one to use
|
|
||||||
#if 0
|
|
||||||
// remove commented out packages
|
|
||||||
list<string> deps = StringHelper::split( depends, ',' );
|
|
||||||
list<string>::iterator it = deps.begin();
|
|
||||||
for ( ; it != deps.end(); ++it ) {
|
|
||||||
if ( (*it)[0] == '#' ) {
|
|
||||||
cerr << "Commented dep: " << *it << endl;
|
|
||||||
} else {
|
|
||||||
if ( it != deps.begin() ) {
|
|
||||||
m_data->depends += ",";
|
|
||||||
}
|
|
||||||
m_data->depends += *it;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
m_data->depends = depends;
|
m_data->depends = depends;
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,8 +70,8 @@ PrtGet::PrtGet( const ArgParser* parser )
|
|||||||
m_pkgDB = new PkgDB(m_parser->installRoot());
|
m_pkgDB = new PkgDB(m_parser->installRoot());
|
||||||
readConfig();
|
readConfig();
|
||||||
|
|
||||||
m_useRegex = m_config->useRegex() || m_parser->useRegex();
|
m_useRegex = ( m_config->useRegex() || m_parser->useRegex() );
|
||||||
m_followSoftdeps = m_config->followSoftdeps() || m_parser->followSoftdeps();
|
m_followSoftdeps = ( m_config->followSoftdeps() || m_parser->followSoftdeps() );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! destruct PrtGet object */
|
/*! destruct PrtGet object */
|
||||||
@ -1263,7 +1263,7 @@ void PrtGet::printf()
|
|||||||
assertExactArgCount(1);
|
assertExactArgCount(1);
|
||||||
|
|
||||||
initRepo();
|
initRepo();
|
||||||
string filter = m_parser->useRegex() ? "." : "*";
|
string filter = m_useRegex ? ".*" : "*";
|
||||||
if ( m_parser->hasFilter() ) {
|
if ( m_parser->hasFilter() ) {
|
||||||
filter = m_parser->filter();
|
filter = m_parser->filter();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user