Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139196 - cdrom.eclass: CDROM_SET_NAMES used by some ebuilds not utilized by eclass
Summary: cdrom.eclass: CDROM_SET_NAMES used by some ebuilds not utilized by eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 130051
  Show dependency tree
 
Reported: 2006-07-04 08:40 UTC by patrick
Modified: 2017-04-27 21:51 UTC (History)
1 user (show)

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


Attachments
possible usage in combination with two other CDs (blub,245 bytes, text/plain)
2006-07-04 08:46 UTC, patrick
Details
corrected example (foo,1.13 KB, text/plain)
2006-07-05 08:55 UTC, patrick
Details
example (example,739 bytes, text/plain)
2007-10-13 09:29 UTC, patrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description patrick 2006-07-04 08:40:51 UTC
The CDROM_SET_NAMES is used in quake2-data quake1-data and rune ebuild (and perhaps others I am not aware of), but is not declared anywhere. It should make it possible to choose from one of several CDs.
Comment 1 patrick 2006-07-04 08:46:12 UTC
Created attachment 90862 [details]
possible usage in combination with two other CDs

Would be cool if the CDROM_SET_NAMES would also work in combination with one or several other CDs. This is an example of an ebuild I wrote.
Comment 2 SpanKY gentoo-dev 2006-07-04 18:07:27 UTC
your example is wrong ... you can use CDROM_NAME or CDROM_NAME_1 / CDROM_NAME_2, not both
Comment 3 SpanKY gentoo-dev 2006-07-04 18:16:45 UTC
ive added support for CDROM_NAME_SET to eutils.eclass

if this variable is set, then the code will setup CDROM_NAME_# automatically
Comment 4 patrick 2006-07-05 08:46:34 UTC
You implemented it the wrong way. This variable should include several CDs from which only ONE is needed in cases where the files are located different on different CDs (see quake2-data ebuild or one of the others as an example).
Comment 5 patrick 2006-07-05 08:55:06 UTC
Created attachment 90973 [details]
corrected example

I corrected the example and enhanced it a bit, so you see better what I mean. I wanted to show the usage of a CDROM_SET_NAME in combination with other CDs. I hope you understand it now, it would be cool if things like this would work, otherways we have to use hacks like in Paul Bredburys tidied unreal tournament ebuild (#134156).
Comment 6 SpanKY gentoo-dev 2006-07-05 11:37:46 UTC
oh that ... yeah i remember not implementing that on purpose and just declearing CDROM_SET_NAMES in ebuilds to remind myself to add support for it some day :p
Comment 7 SpanKY gentoo-dev 2006-07-05 16:19:51 UTC
what a weird typo in that last post ...

s/declearing/declaring/
Comment 8 patrick 2006-07-06 06:38:57 UTC
Perhaps it is easier not to use correct english sentences to discribe what CDs are needed, but more like a list:

You need:
one of    Bla CD/Blu CD/Bli CD  (CDROM_ROOT_1)
and       Blub CD               (CDROM_ROOT_2)
and       Foo CD                (CDROM_ROOT_3)
one of    Dsdf CD/Easa CD       (CDROM_ROOT_4)


This is probably easier to implement and surely easier and faster to read.
Just an idea though.
Comment 9 patrick 2007-10-13 07:20:54 UTC
Implementation wise it would perhaps be more intelligent to kick the CDROM_SET_NAMES flag and only use CDROM_NAME_#, but allow multiple names listed under one.
Example:
export CDROM_NAME_1=("Unreal Tournament" "Unreal Tournament GotY CD1")
export CDROM_NAME_2="Unreal Gold CD"

and later on export CDROM_SET_# variables.
Comment 10 patrick 2007-10-13 09:29:14 UTC
Created attachment 133309 [details]
example

This is a new approach of how this could be done, it makes CDROM_SET_NAMES obsolete and provides a much more versatile interface for ebuild programmers.
Comment 11 James Le Cuirot gentoo-dev 2017-04-23 11:19:49 UTC
This eclass is about to have a near rewrite applied to it. Please see the #gentoo-dev archives if you're curious. This issue is one I was well aware of and I have preserved the existing behaviour of using an array for each disc across all sets rather than for each set.

To make things less confusing, I have renamed the array to CDROM_NAMES. As noted, there are ebuilds already setting CDROM_SET_NAMES but this is already completely ignored as they all use a single disc.

While I liked some of Patrick's ideas above, I decided not to over-complicate what is essentially an aesthetic feature of a relatively little-used eclass. You can still have per-set disc names after the first disc though. Include all the disc names for all the sets in CDROM_NAMES initially. After the first disc has been detected, use CDROM_SET to redefine CDROM_NAMES to just include the names from the detected set before calling cdrom_load_next_cd.
Comment 12 James Le Cuirot gentoo-dev 2017-04-27 21:51:47 UTC
This has now been pushed.