Ubuntu

Kde help index creation fails due to dash incompatability

Reported by mugginz on 2008-06-21
16
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Medium
Harald Sitter
Hardy
Undecided
Unassigned
Intrepid
Medium
Harald Sitter

Bug Description

Binary package hint: kdebase

kdebase 4:3.5.9-0ubuntu7

When building the Search Index inside KHelpCenter, it falsely reports success even though it fails.

The cause of the failure is that docbookparser isn't compatible with dash. When its run using dash instead of bash, it produces errors such as

/home/mugginz/.kde/share/apps/khelpcenter/index//kde_application_manuals.tmp/docbookparser: 11: Bad substitution

The Fix.
--------
The following file
        "~/.kde/share/apps/khelpcenter/index/kde_application_manuals.tmp/docbookparser"
is where the 'Bad substitution' errors come from.

It needs line 1 changed from
#! /bin/sh
    to
#! /bin/bash

The above file 'docbookparser' is created from inside the following python script
        "/usr/bin/khc_docbookdig.pl"

The source for the python script is
        "kdebase-3.5.9/khelpcenter/searchhandlers/khc_docbookdig.pl.in"

So if we change line 127 of khc_docbookdig.pl.in from
 #! /bin/sh
to
        #! /bin/bash
the prob is fixed.

Also related to:
   Bug #19767 in kdebase (Ubuntu) - htdig should be a dependecy of the base kde packages.

TEST CASE:
Without the patch:
1. Install khelpcenter and htdig
2. Run khelpcenter and go to the search options tab in the sidebar
3. Click the Build search index button
4. Check off Application manuals in the dialog
5. Click Build index
6. Click on Details. There will be an error 11: Bad substitution while building the index

With the patch:
Same steps, no error and the index is created successfully.

mugginz (mugginz1) wrote :
Terence Simpson (tsimpson) wrote :

I'd rather the sctipt was fixed to work with /bin/sh than change it to /bin/bash

mugginz (mugginz1) wrote :

OK this patch is against khc_docbookdig.pl.in from

kdebase-3.5.9/khelpcenter/searchhandlers/ after kdebase_3.5.9-0ubuntu7.2.diff was applied.

This patches khc_docbookdig.pl.in to work with dash.

Yuriy Kozlov (yuriy-kozlov) wrote :

I also had to change kdekdehtmldir to kdehtmldir as mentioned in bug 19767.

Thank you for the detailed report and diagnosis.
Interested in creating a debdiff with both the fixes?

Changed in kdebase:
status: New → Triaged
mugginz (mugginz1) wrote :

Ooops, thanks Yuriy, I forgot to put that change in. This patch includes the kdehtmldir change.

I'm not familiar with how to build a debdiff for this so I'll have to do some learnin before I can submit a debdiff.

Yuriy Kozlov (yuriy-kozlov) wrote :

mugginz, if you are interested in learning, join #kubuntu-devel on IRC and someone can help you. Also, see https://wiki.kubuntu.org/PackagingGuide/Complete#head-b1654e82d4e54cbb4e3807d7ac328cd744934403

Changed in kdebase:
milestone: none → ubuntu-8.04.2
mugginz (mugginz1) wrote :

Yuriy, here's the output of

debdiff kdebase_3.5.9-0ubuntu7.2.dsc kdebase_3.5.9-0ubuntu7.3.dsc > kdebase_3.5.9-0ubuntu7.3.debdiff

That link was most helpful.

description: updated
Changed in kdebase:
importance: Undecided → Medium
status: Triaged → In Progress
Jonathan Riddell (jr) wrote :

Uploaded to hardy-proposed, awaiting approval.

Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in kdebase:
status: New → Fix Committed
Martin Pitt (pitti) wrote :

Is this an issue for KDE4 in intrepid? If not, the intrepid task should be marked as "invalid".

Changed in kdebase:
milestone: ubuntu-8.04.2 → none
assignee: nobody → jr
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in kdebase:
status: Fix Committed → Fix Released
Harald Sitter (apachelogger) wrote :

-(~/src/412/kdebase-runtime/kdebase-runtime-4.1.2/khelpcenter/searchhandlers:$)-> grep 'bin/sh' khc_docbookdig.pl.cmake
#! /bin/sh

Assigning the Intrepid task to me, as I am preparing an update for kdebase-runtime anyway.

Changed in kdebase:
assignee: jr → apachelogger
Changed in kdebase:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers