Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 153544 - kde-base/kdm-3.5.5 - grub patch is not applied in the ebuild
Summary: kde-base/kdm-3.5.5 - grub patch is not applied in the ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-31 04:57 UTC by Łukasz Mierzwa
Modified: 2006-11-04 18:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Upstream patch, applies cleanly (kdm-grub-patch.diff,864 bytes, patch)
2006-11-01 01:55 UTC, Frederic Van Assche
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Mierzwa 2006-10-31 04:57:16 UTC
When emergeing kdm-3.5.5 there should be kdm-3.5.4-grub-patch.diff patch applied, it is not and the possibility to set default grub entry for next boot is lost.
EDIT:The patch need to be fixed for 3.5.5 as the one for 3.5.4 does not apply.
Comment 1 Ioannis Aslanidis (RETIRED) gentoo-dev 2006-10-31 14:36:34 UTC
The patch obviously does not apply: the code has changed.
Comment 2 Frederic Van Assche 2006-11-01 01:48:55 UTC
(In reply to comment #1)
> The patch obviously does not apply: the code has changed.
> 

Try this patch:

--- kdm-3.5.3.orig/kdm/backend/bootman.c        2005-09-10 10:26:12.000000000 +0200
+++ kdm-3.5.3/kdm/backend/bootman.c     2006-07-07 22:09:08.000000000 +0200
@@ -82,7 +82,7 @@
        int len;
        char line[1000];

-       if (!grub && !(grub = locate( "grub" )))
+       if (!grub && !(grub = locate( "grub-set-default" )))
                return BO_NOMAN;

        *def = 0;
@@ -130,19 +130,14 @@
 static void
 commitGrub( void )
 {
-       FILE *f;
-       int pid;
-       static const char *args[] = { 0, "--batch", "--no-floppy", 0 };
-
+       char command[256];
+
        if (sdRec.bmstamp != mTime( GRUB_MENU ) &&
            setGrub( sdRec.osname, &sdRec ) != BO_OK)
                return;

-       args[0] = grub;
-       if ((f = pOpen( (char **)args, 'w', &pid ))) {
-               fprintf( f, "savedefault --default=%d --once\n", sdRec.osindex );
-               pClose( f, pid );
-       }
+       sprintf(command, "%s %d", grub, sdRec.osindex);
+       system(command);
 }

 static char *lilo;
Comment 3 Frederic Van Assche 2006-11-01 01:53:18 UTC
Hmmm, some lines got wrapped. I'll add it as an attachment.
Comment 4 Frederic Van Assche 2006-11-01 01:55:31 UTC
Created attachment 100952 [details, diff]
Upstream patch, applies cleanly
Comment 5 Łukasz Mierzwa 2006-11-01 06:21:45 UTC
This patch is also missing in kdm-3.5.4-r2 ( it was introduced in kdm-3.5.4-r1).
Comment 6 Ioannis Aslanidis (RETIRED) gentoo-dev 2006-11-01 07:49:38 UTC
(In reply to comment #5)
> This patch is also missing in kdm-3.5.4-r2 ( it was introduced in
> kdm-3.5.4-r1).

No. It's not missing. It was moved to the patchset.
Comment 7 Ioannis Aslanidis (RETIRED) gentoo-dev 2006-11-04 18:24:13 UTC
Erm...you added a patch for version 3.5.3... the lines do not match. I ended regenerating the patch myself. Fixed in CVS. Please, test and reopen if necessary.