ports/118482: sysutils/desktopbsd-tools dbsd-pkgmgr doesn't recognize system version
Dmitry Klimov
lazyklimm at gmail.com
Fri Dec 7 12:30:01 UTC 2007
>Number: 118482
>Category: ports
>Synopsis: sysutils/desktopbsd-tools dbsd-pkgmgr doesn't recognize system version
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Dec 07 12:30:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Dmitry Klimov
>Release: FreeBSD 7.0-BETA3
>Organization:
intellect
>Environment:
FreeBSD home.intellect.local 7.0-BETA3 FreeBSD 7.0-BETA3 #0: Fri Nov 30 14:17:40 MSK 2007 dk at home.intellect.local:/usr/obj/usr/src/sys/ADMIN i386
>Description:
dbsd-pkgmgr doesn't recognize correctly system version
>How-To-Repeat:
just install and run desktopbsd-tools on Freebsd 7.0
>Fix:
more patch-*
--- 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;
}
..skipping...
--- 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
Patch attached with submission follows:
--- 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;
}
--- 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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list