Author: jw Date: 2006-09-13 19:13:26 +0200 (Wed, 13 Sep 2006) New Revision: 1875 Modified: tools/prt-get/trunk/ChangeLog tools/prt-get/trunk/configure tools/prt-get/trunk/configure.in tools/prt-get/trunk/src/prtget.cpp tools/prt-get/trunk/src/prtget.h tools/prt-get/trunk/src/versioncomparator.cpp Log: prt-get: prepare for 5.14 Modified: tools/prt-get/trunk/ChangeLog =================================================================== --- tools/prt-get/trunk/ChangeLog 2006-09-13 14:28:55 UTC (rev 1874) +++ tools/prt-get/trunk/ChangeLog 2006-09-13 17:13:26 UTC (rev 1875) @@ -1,10 +1,12 @@ -* 0.5.14 00.00.200x Johannes Winkelmann +* 5.14 13.09.2006 Johannes Winkelmann - Remove handling of external dependency list - make InstallTransaction::getPkgDest use pkgmk.conf from install-root - revert getPkgDest to ignore install-root - determine PKGMK_PACKAGE_DIR using fgrep without sourcing pkgmk.conf +- fix bug in "undecided" output of diff (thanks treach) +- fix bug in version comperator introduced in 5.13 -* 0.5.13 08.09.2006 Johannes Winkelmann +* 5.13 08.09.2006 Johannes Winkelmann - Show undecided versions in diff and sysup when using "prefer higher" - fix display bug in "dependent" - fix bug in version comparator Modified: tools/prt-get/trunk/configure =================================================================== --- tools/prt-get/trunk/configure 2006-09-13 14:28:55 UTC (rev 1874) +++ tools/prt-get/trunk/configure 2006-09-13 17:13:26 UTC (rev 1875) @@ -742,7 +742,7 @@ psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' -mandir='${prefix}/man' +mandir='${datarootdir}/man' ac_prev= ac_dashdash= @@ -1245,7 +1245,7 @@ --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [PREFIX/man] + --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] @@ -2023,7 +2023,7 @@ # Define the identity of the package. PACKAGE=prt-get - VERSION=5.13 + VERSION=5.14 cat >>confdefs.h <<_ACEOF Modified: tools/prt-get/trunk/configure.in =================================================================== --- tools/prt-get/trunk/configure.in 2006-09-13 14:28:55 UTC (rev 1874) +++ tools/prt-get/trunk/configure.in 2006-09-13 17:13:26 UTC (rev 1875) @@ -1,7 +1,7 @@ # Process this file with autoconf to produce a configure script. AC_INIT AC_CONFIG_SRCDIR([src/prtget.cpp]) -AM_INIT_AUTOMAKE(prt-get,5.14pre) +AM_INIT_AUTOMAKE(prt-get,5.14) dnl Determine default prefix Modified: tools/prt-get/trunk/src/prtget.cpp =================================================================== --- tools/prt-get/trunk/src/prtget.cpp 2006-09-13 14:28:55 UTC (rev 1874) +++ tools/prt-get/trunk/src/prtget.cpp 2006-09-13 17:13:26 UTC (rev 1875) @@ -835,8 +835,8 @@ void PrtGet::printFormattedDiffLine(const string& name, - const string& version1, - const string& version2, + const string& versionInstalled, + const string& versionPortsTree, bool isLocked) { cout.setf( ios::left, ios::adjustfield ); @@ -846,7 +846,7 @@ cout.width( 20 ); cout.fill( ' ' ); - cout << version1; + cout << versionInstalled; string locked = ""; if ( isLocked ) { @@ -854,7 +854,7 @@ } cout.width( 20 ); cout.fill( ' ' ); - cout << version2 << locked << endl; + cout << versionPortsTree << locked << endl; } /*! print an overview of port which are installed in a different version @@ -931,7 +931,8 @@ } } - if (m_undefinedVersionComp.size()) { + if (m_undefinedVersionComp.size() && + (m_parser->all() || m_parser->verbose()) ) { cout << "\n\n" << "Undecidable version differences (use --strict-diff)" << endl << endl; printFormattedDiffLine("Port", @@ -946,8 +947,8 @@ for (; it != m_undefinedVersionComp.end(); ++it) { p = it->first; printFormattedDiffLine(p->name(), + it->second, p->versionReleaseString(), - it->second, false); } } @@ -1101,9 +1102,9 @@ for ( ; uit != m_undefinedVersionComp.end(); ++uit ) { p = uit->first; cout << p->name() << " (" - << p->versionReleaseString() + << uit->second << " vs " - << uit->second << ")" << endl; + << p->versionReleaseString() << ")" << endl; } } Modified: tools/prt-get/trunk/src/prtget.h =================================================================== --- tools/prt-get/trunk/src/prtget.h 2006-09-13 14:28:55 UTC (rev 1874) +++ tools/prt-get/trunk/src/prtget.h 2006-09-13 17:13:26 UTC (rev 1875) @@ -45,7 +45,7 @@ PG_INSTALL_ERROR, PG_PARTIAL_INSTALL_ERROR }; - + PrtGet( const ArgParser* parser ); ~PrtGet(); @@ -117,7 +117,7 @@ list<string>& target ); void warnPackageNotFound(InstallTransaction& transaction); - + static void printFormattedDiffLine(const string& name, const string& version1, const string& version2, @@ -155,6 +155,7 @@ compareVersions( const string& v1, const string& v2 ); static bool printFile(const string& file); + // map package from ports tree to version currently installed std::list< std::pair<const Package*, std::string> > m_undefinedVersionComp; }; Modified: tools/prt-get/trunk/src/versioncomparator.cpp =================================================================== --- tools/prt-get/trunk/src/versioncomparator.cpp 2006-09-13 14:28:55 UTC (rev 1874) +++ tools/prt-get/trunk/src/versioncomparator.cpp 2006-09-13 17:13:26 UTC (rev 1875) @@ -69,17 +69,17 @@ for (int k = 0; k < subTokLen; ++k) { long sl1 = strtol(subtokens1[k].c_str(), &error1, 10); long sl2 = strtol(subtokens2[k].c_str(), &error2, 10); - if (!error1 && !error2) { + if (*error1 == 0 && *error2 == 0) { if (sl1 < sl2) { return LESS; } else if (sl1 > sl2) { return GREATER; } } else { - + // string tokens if (subtokens1[k][1] == 0 && subtokens2[k][1] == 0) { - + if (subtokens1[k][0] < subtokens2[k][0]) { return LESS; } else if (subtokens1[k][0] > subtokens2[k][0]) { @@ -246,6 +246,10 @@ check("1.4.2beta3", "1.4.2alpha2", GREATER); check("1.4.2-some", "1.4.2-1", UNDEFINED); check("1.4.2-1", "1.4.2-some", UNDEFINED); + + check("7.0r63-3", "7.0r68-1", LESS); + check("27", "28e", LESS); + } else { check(argv[1], argv[2], UNDEFINED, false); }
participants (1)
-
crux@crux.nu