ports/118482: sysutils/desktopbsd-tools dbsd-pkgmgr doesn't recognize system version
DK
lazyklimm at gmail.com
Mon Dec 24 08:00:06 UTC 2007
The following reply was made to PR ports/118482; it has been noted by GNATS.
From: DK <lazyklimm at gmail.com>
To: bug-followup at freebsd.org,
lazyklimm at gmail.com
Cc:
Subject: Re: ports/118482: sysutils/desktopbsd-tools dbsd-pkgmgr doesn't recognize system version
Date: Mon, 24 Dec 2007 10:27:57 +0300
--Boundary-00=_+91bHSD4priFn+B
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--Boundary-00=_+91bHSD4priFn+B
Content-Type: text/x-diff;
charset="us-ascii";
name="patch-libdesktopbsd_package.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="patch-libdesktopbsd_package.h"
--- libdesktopbsd/package.h.orig 2007-12-06 13:13:50.000000000 +0300
+++ libdesktopbsd/package.h 2007-12-06 13:32:47.000000000 +0300
@@ -27,10 +27,8 @@
#define PORTSDIR "/usr/ports/"
#define PKGDB "/var/db/pkg/"
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 600000
-#define INDEX_PATH "/usr/ports/INDEX-6"
-#elif defined(__FreeBSD_version) && __FreeBSD_version >= 500036
-#define INDEX_PATH "/usr/ports/INDEX-5"
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 500036
+#define FREEBSD_MAJOR_VERSION (__FreeBSD_version>>5)/3125
#else
#error "FreeBSD >= 5 required"
#endif
--Boundary-00=_+91bHSD4priFn+B
Content-Type: text/x-diff;
charset="us-ascii";
name="patch-PackageMgr_wndmain.ui.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="patch-PackageMgr_wndmain.ui.h"
--- PackageMgr/wndmain.ui.h.orig 2006-08-05 04:17:20.000000000 +0400
+++ PackageMgr/wndmain.ui.h 2007-12-07 15:57:37.000000000 +0300
@@ -577,7 +577,8 @@
bool wndMain::createAvailList() {
- FILE *f = fopen(INDEX_PATH, "r");
+ QString indexPath = QString(PORTSDIR "INDEX-%1").arg(FREEBSD_MAJOR_VERSION);
+ FILE *f = fopen(indexPath, "r");
if (f != NULL) {
QPixmap pixCategory = DBSDGlobal::getIconLoader()->loadIcon("folder",
DBSDIconLoader::SmallListItem);
@@ -633,7 +634,7 @@
lblInfo->setText(tr("%1 Packages available.").arg(count));
} else {
/* INDEX couldn't be opened */
- Dialogs::warnDlg(tr("Unable to read from '%1'!").arg(INDEX_PATH));
+ Dialogs::warnDlg(tr("Unable to read from '%1'!").arg(indexPath));
return false;
}
--Boundary-00=_+91bHSD4priFn+B--
More information about the freebsd-ports-bugs
mailing list