Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 366733 - kernel-2.eclass: remove unnecessary arch directories to save space
Summary: kernel-2.eclass: remove unnecessary arch directories to save space
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement with 2 votes (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2011-05-10 09:58 UTC by Aleksey Kunitskiy
Modified: 2021-06-18 23:14 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksey Kunitskiy 2011-05-10 09:58:32 UTC
In 99% cases user does not need arch support except of his own. Deleting unnecessary files frees > 20% of disk space:
485904	linux-2.6.37-gentoo-r4
380564	linux-2.6.37-gentoo-r4 (with x86 arch only)

This feature can be implemented as a use flag for flexibility

Reproducible: Always
Comment 1 BRULE Herman 2012-04-16 10:40:12 UTC
+1 Here it's very usefull on embeded system, and minimal system. Too for the FS speed on slow media.
Comment 2 BRULE Herman 2012-04-16 11:29:25 UTC
And if it can be excluded from the tar decrompression...
Comment 3 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-03-20 16:48:43 UTC
Does excluding those directories require any further modifications?

I'd think Makefiles would fail because of those directories not being present.
Comment 4 Aleksey Kunitskiy 2013-03-20 20:21:40 UTC
(In reply to comment #3)
> Does excluding those directories require any further modifications?
> I'd think Makefiles would fail because of those directories not being
> present.
Absolutely no. At least when compiling for x86/x86_64 arch (checked with 3.4.35 kernel). The only problem may be applying patch over kernel tree with absent (unneded) arch directories, but in this case I think patch can silently ignore those ones.

I have no working ebuild ATM but AFAIK such usecase is present in qt* packages where for each package (e.g. qt-gui or qt-core) only needed directories are unpacked from dist tar file.
Comment 5 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-04-12 16:27:45 UTC
Working myself through the list of eclass bugs, so evaluating this one:

> This feature can be implemented as a use flag for flexibility.

We can't do this for everyone as it would break patches that involve patching arch directories (we can however defend ourselves, suggesting they use /etc/portage/patches and/or disable the USE flag), there are probably also people that share the directory and so on... The default should for these various reasons be as unmodified as possible.

I'm not sure what a sane USE flag name for this would be, "noarch" isn't really correct, "multiarch" would draw attention to "support for multiple archs" which is kind of weird, "embedded" would be ambiguous (for one, it may remove arches, for another it would add arches) so I'm not sure if there is a clear and sane name.

Do you have an idea for a clear and sane USE flag name?

> The only problem may be applying patch over kernel tree with absent (unneded) arch directories, but in this case I think patch can silently ignore those ones.

This may be problematic if you want it excluded from the tar decrompression and not affect the patches, since what actually happens is that it first takes linux-3.8 and then it patches it with patches 3.8.1 up to 3.8.6 and any other patches that were given. So, from each patch it would have to remove the patches against arch directories on the fly; which makes this more complex to implement than a simple remove the directories.

The other method would be to just remove it when installing, it wouldn't trim down the work the eclass does but it at least results in the resulting install to take less disk space.
Comment 6 Mike Pagano gentoo-dev 2021-06-18 23:14:55 UTC
As per comment #5, this could potentially break our patching system for the gain described.