Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 25216
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Martin Schlemmer (RETIRED) <azarah@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Andy Dustman <farcepest@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
debianutils-1.16.7-gentoo.patch Make mkboot not read the whole portage tree patch Andy Dustman 2003-07-24 17:29 0000 7.35 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 25216 depends on: Show dependency tree
Bug 25216 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-07-24 17:27 0000
In /usr/sbin/mkboot grubcheck(), grub is tested for by the line:

[ "$(qpkg -nc sys-apps/grub)" = "sys-apps/grub *" ]

This is a big time-waster, because it crawls the entire portage tree. If your
portage tree is mounted via NFS, this is painful...

A better solution is:

[ "$(qpkg -I -nc sys-apps/grub)" = "sys-apps/grub" ]

An updated version of debianutils-1.16.7-gentoo.patch will be attached.

Reproducible: Always
Steps to Reproduce:
1. Use mkboot, usually via kernel's make install
2.
3.

Actual Results:  
It finds grub (slowly)

Expected Results:  
Find grub (quickly)

------- Comment #1 From Andy Dustman 2003-07-24 17:29:26 0000 -------
Created an attachment (id=14976) [details]
Make mkboot not read the whole portage tree

This is a modified version of debianutils-1.16.7-gentoo.patch in the current
portage tree which makes the grubcheck() function of mkboot much faster.

------- Comment #2 From Jon Riley 2003-08-12 07:38:25 0000 -------
I bumped up against this but in a worse form - It's not just slow, it doesn't
work.

The line
[ "$(qpkg -I -nc sys-apps/grub)" = "sys-apps/grub" ]
Fails to detect my grub because I also have grub-static installed, which causes
qpkg to return

sys-apps/grub *
sys-apps/grub-static

which fails the test.

------- Comment #3 From Jon Riley 2003-08-12 07:49:15 0000 -------
Quick correction - I typoed

[ "$(qpkg -nc sys-apps/grub)" = "sys-apps/grub *" ]

Is the line that doesn't work

[ "$(qpkg -I -nc sys-apps/grub)" = "sys-apps/grub" ]

does work.

------- Comment #4 From Gregorio Guidi (RETIRED) 2003-09-11 03:07:50 0000 -------
if [ -x /usr/bin/qpkg ] ; then 
  [ "$(qpkg -I -nc sys-apps/grub)" = "sys-apps/grub" ] 
else 
  return 1 
fi 
 
This never returns zero! 
At least it should be: 
 
if [ -x /usr/bin/qpkg ] ; then 
  [ "$(qpkg -I -nc sys-apps/grub)" = "sys-apps/grub" ] && return 0 
else 
  return 1 
fi 
 
But it cannot fail just because gentoolkit is not installed, and there's the 
grub-static problem... Summing up, why don't we simply have 
if [ -f /boot/grub/grub.conf ] ; then 
  return 0 
else 
  return 1 
fi 
 

------- Comment #5 From Martin Schlemmer (RETIRED) 2003-09-24 19:26:40 0000 -------
As /boot might not be mounted ...

------- Comment #6 From Martin Schlemmer (RETIRED) 2003-09-24 19:56:20 0000 -------
Anyhow, use portageq and not quickpkg.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug