Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 445110

Summary: kernel-2.eclass v1.277 - Default DESCRIPTION incorrectly built.
Product: Gentoo Linux Reporter: Eric F. GARIOUD <eric-f.garioud>
Component: EclassesAssignee: Gentoo Kernel Miscellaneous <kernel-misc>
Severity: minor CC: tomwij
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: description.patch

Description Eric F. GARIOUD 2012-11-28 21:02:48 UTC
the kernel-2.eclass builds a default DESCRIPTION for the package supposed to be :
DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR:-$KV_PATCH} linux kernel"

Because none of the variables used in this definition are defined when this setting occurs, this results in DESCRIPTION being set to :
"Sources for the . linux kernel"

OK! I understand that it is a very minor point. Even more minor that most of the kernel packages set their own DESCRIPTION after the default setting occurred... but... you know... I think that helpers should either be rock solid or... not be.

OK, I also understand that kernel maintainers are ENOTIME, so I can provide a patch for this one provided we agree on one of the 2 possible solutions :

1/ Simply remove the setting of DESCRIPTION as part of the eclass considering that package maintainers take care of it.

2/ Keep the default DESCRIPTION as is, but ensure that the variables needed are initialized prior to the setting.
The most gracious way to ensure this is, in my opinion to call detect_version just before the setting.
This would get no side effect as, anyway, the eclass calls detect_version (via kernel_is) immediately after setting DESCRIPTION, when starting with the deblob stuff.
That would even get the advantage to remove the need for an explicit detect_version as part of the ebuilds. 

Reproducible: Always
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-04-12 15:07:32 UTC
Created attachment 345386 [details]

`grep -r --include='*sources*.ebuild' DESCRIPTION /usr/portage/ -L`

reveals no results, this means that every sources ebuild in the Portage Tree defines its own DESCRIPTION. As for the maintainers out of tree, I don't want to communicate that they must change something when we don't need to.

I think we are better off to just drop the version from the description, since it is likely that a sources directory contains sources that are not in the same ${KV_MAJOR}.${KV_MINOR:-$KV_PATCH}; and we also don't want to give the fake impression that separate directories are made when that value changes. See the attached patch.

This patch will be part of a series of patches that will be sent to the mailing lists and committed all at once to the tree in the near future.
Comment 2 Eric F. GARIOUD 2013-04-12 20:56:23 UTC
(In reply to comment #1)

This makes sense. Thank you Tom for having cared.
Comment 3 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-04-17 13:53:17 UTC
  17 Apr 2013; Tom Wijsman <> kernel-2.eclass:
  Added a warning after the variables that modifying other variables in
  the eclass is not supported, there is a chance that we will not fix
  resulting bugs. Fixes bug #421721.
  Clarify the default DESCRIPTION and make it not use versions, a
  directory with ebuilds that inherit this eclass may contain multiple
  versions and we also don't want to give the impression that a new
  directory needs to made if that's not the case. Fixes bug #445110.
  Clarified which patch depths are used in the normal output and error
  output when applying patches. Fixes bug #436402.
  Made sure .tmp_gas_check is created inside the temp folder, it
  accidentally created temp.tmp_gas_check instead. Fixes bug #336732.
  Make UNIPATCH_DOCS work again, install 0000_README document when
  using genpatches. Fixes bug #301478.