[Build-common-hackers] class vs rules?

Jonas Smedegaard dr at jones.dk
Tue Aug 23 16:45:35 UTC 2011


Hi IOhannes,

On 11-08-23 at 05:41pm, IOhannes m zmoelnig wrote:
> On 2011-08-23 10:41, Jonas Smedegaard wrote:
> > 
> > Classes are composed with extendability in mind, rules are not.
> 
> so if my mindset is non-extendable today i will put foo.mk in rules/ 
> but what happens if i change my mind, and redesign it to be 
> extendible?

Sure, be too messy and you will have problems taking over the World.  
Like is the case with CDBS.

Or be too smart and you will have problems taking over the World.  Like 
the Hurd.

I did not invent CDBS.  I did not choose to distinguish between classes 
and rules.  So I cannot tell you why it is divine, only try reflect on 
how it makes some kind of sense to me. :-)

I would prefer that we strive towards classes most possible.



> >> esp., why is "gnustep.mk" a 'class' and and "kde.mk" a 'rule'?
> > 
> > Both are classes.
> > 
> 
> "gnustep.mk" lives in "rules" (despite me claiming it was a "class")

Oh, ok.  I must confess that I only looked up kde.mk as I was quite sure 
I remembered that being a class - and was right.  So you accidentally 
flipped them around, and I added to the confusion by only checking on 
one of them.

So let me try again:

"kde.mk" is a class (not a rule).  I cannot speak for "gnustep.mk" as I 
am not familiar with that snippet.

What is the output of "dpkg -S /usr/share/cdbs/1/rules/gnustep.mk"?


> so is the distinction between the two types a theoretical or do you 
> find it easy to put a snippet into one of the 2 directories?

For the snippets that I have added to CDBS I found it ease to decide 
where it made sense to me to add them, yes.  Try grep for my name in the 
sources of cdbs itself and challenge me with any of them that I was 
involved in - perhaps you disagree with some of my choices (and maybe I 
do too now looking back).


> and how about users? is the end-user supposed to guess the 
> compositional structure of the snippet they want to use? ;-)

No, not guess, but look: If trying names/paths/variables at random then 
it takes quite a bit of monkey coding to hit jackpot, I guess. ;-)


> personally, i usually just do a grep (or similar) over 
> /usr/share/cdbs/1/*/* to find if there is anything useful for me...

That's how I use CDBS too.  And how I use Perl too, for that matter 
(grepping a different path, obviously).


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20110823/6bcfe892/attachment.pgp>


More information about the Build-common-hackers mailing list