Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238707 - Error when building with object directories (O=)
Summary: Error when building with object directories (O=)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-09-26 01:26 UTC by Doug Nazar
Modified: 2010-12-10 10:37 UTC (History)
1 user (show)

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


Attachments
If SUBLEVEL wasn't found, look for it in the original source directory (genkernel-handle-object-directories.patch,728 bytes, patch)
2008-09-26 01:27 UTC, Doug Nazar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Nazar 2008-09-26 01:26:07 UTC
When using O= build directories the Makefile doesn't contain the SUBLEVEL & EXTRAVERSION variables. We need to go back to the source directory and reparse. Currently shows as the following error because SUB is null.

/usr/share/genkernel/gen_arch.sh: line 61: [: : integer expression expected


Reproducible: Always

Steps to Reproduce:
1. mkdir /usr/src/test
2. make -C /usr/src/linux O=/usr/src/test defconfig
3. genkernel --kerneldir=/usr/src/test
Comment 1 Doug Nazar 2008-09-26 01:27:32 UTC
Created attachment 166439 [details, diff]
If SUBLEVEL wasn't found, look for it in the original source directory
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2008-09-26 01:36:35 UTC
I'm not sure we want to support this. I've never even seen this usage before. Also, your code could break pretty easily if they decide to change the Makefile format a bit.
Comment 3 Doug Nazar 2008-09-26 03:49:59 UTC
It's quite common when supporting multiple configurations. It allows you to have a single source tree for multiple build configs.

It won't break anymore than the rest of the script when they change the Makefile. Although I had considered pulling it out of the KV variable since that already deals with different versions, I decided to grab SUB in a similar manner to the original version. Also although the dev version has a make prepare it's commented out in the released version so kernel.release may not exist.

Comment 4 Chris Gianelloni 2008-11-03 13:02:30 UTC
OOhh... patches... me likey patches...

I'll look into this for 3.4.11's release.
Comment 5 Andrew Gaffney (RETIRED) gentoo-dev 2008-11-15 16:00:26 UTC
I've applied this patch in Git. Thanks.
Comment 6 Sebastian Pipping gentoo-dev 2010-12-10 10:37:46 UTC
(In reply to comment #5)
> I've applied this patch in Git. Thanks.

Due to the date of the last comment on this bug I assume that feature to be
included in 3.4.10.907 or an earlier release of genkernel.

Closing, please re-open as needed.