Bug 94231 - sysutils/kdeadmin3: kpackage doesn't use /usr/ports/INDEX-{4,6,7} file
Summary: sysutils/kdeadmin3: kpackage doesn't use /usr/ports/INDEX-{4,6,7} file
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-08 15:50 UTC by Scot Hetzel
Modified: 2006-03-12 21:52 UTC (History)
0 users

See Also:


Attachments
kdeadmin3.patch (604 bytes, patch)
2006-03-08 15:56 UTC, Scot Hetzel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scot Hetzel 2006-03-08 15:50:02 UTC
Previously, I had FreeBSD 5.x installed on this system, and had created an INDEX-5 in /usr/ports with 'make index'.  I have since upgraded the system to FreeBSD 6.x, and had also created the INDEX-6 with 'make index'.

After the system was upgraded I installed KDE 3, the first time I used kpackage it had read the list of packages from INDEX-5. But when I deleted INDEX-5, kpackage couldn't identify which category an installed port belonged to, instead it listed all installed ports under BSD->Other.

This problems affects all versions of FreeBSD (except for 5.x) since the INDEX file was renamed to INDEX-<OS MAJOR>.

A simple solution was to symbolic link INDEX to INDEX-6, since kpackage looks for INDEX and INDEX-5.

Fix: 

The correct fix would be to patch fbsdInterface.cpp to use the sysctl interface to get the OS Version Major, and then append it to the name of the INDEX file.

As a quick hack, the simplest solution is to have the sysutils/kdeadmin3/Makefile replace INDEX-5 with ${INDEXFILE} in ${WRKSRC}/kpackage/fbsdInterface.cpp

See patch in following e-mail:
How-To-Repeat: On a FreeBSD {4,6,7} System:
Remove /usr/ports/INDEX and /usr/ports/INDEX-5
Install sysutils/kdeadmin3
Use kpackage within KDE
Comment 1 Scot Hetzel 2006-03-08 15:56:03 UTC
http://www.freebsd.org/cgi/query-pr.cgi?pr=94231

Attached is a patch to sysutils/kdeadmin3 that fixes kpackage so that
it can read the INDEX-{4,6,7} file on FreeBSD {4,6,7}.

Scot
--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.
Comment 2 Matteo Riondato freebsd_committer freebsd_triage 2006-03-08 17:49:31 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

Make this a ports PR
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2006-03-08 18:45:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kde

Over to maintainer(s).
Comment 4 Michael Nottebrock freebsd_committer freebsd_triage 2006-03-12 21:51:49 UTC
State Changed
From-To: open->closed

Committed, thanks!