public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] include files question
@ 2013-09-15 17:01 William Hubbs
  2013-09-15 23:35 ` Ian Stakenvicius
  2013-09-20 16:03 ` "Paweł Hajdan, Jr."
  0 siblings, 2 replies; 7+ messages in thread
From: William Hubbs @ 2013-09-15 17:01 UTC (permalink / raw
  To: gentoo development

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

All,

here is another question wrt OpenRC's api.

Currently we store two header files (rc.h and einfo.h) in /usr/include.
Since we have more than one include file, wouldn't it be standard
practice to store them in a sub directory of /usr/include?

Thanks,

William


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] include files question
  2013-09-15 17:01 [gentoo-dev] include files question William Hubbs
@ 2013-09-15 23:35 ` Ian Stakenvicius
  2013-09-20 16:03 ` "Paweł Hajdan, Jr."
  1 sibling, 0 replies; 7+ messages in thread
From: Ian Stakenvicius @ 2013-09-15 23:35 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 15/09/13 01:01 PM, William Hubbs wrote:
> All,
> 
> here is another question wrt OpenRC's api.
> 
> Currently we store two header files (rc.h and einfo.h) in
> /usr/include. Since we have more than one include file, wouldn't it
> be standard practice to store them in a sub directory of
> /usr/include?
> 
> Thanks,
> 
> William
> 


Nah.

Really the only need to storing include files in their own subdir is
for collision avoidance -- ie, if they're part of SDKs or whatnot that
may have multiple versions installed at a time (not necessarily
meaning the packages are slotted but rather upstream intends it to be
possible)

Besides, technically this is only one header per library.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iF4EAREIAAYFAlI2RE4ACgkQ2ugaI38ACPDHmgEAgXw4r7W5Mc1XSGS2PuVvU05U
P3pXk8lpH7t3pSGKfoYA/3nlivtatfTH+nQj+UgH5T1smNnS8anLaCWjyLcETKC1
=3Iu2
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] include files question
  2013-09-15 17:01 [gentoo-dev] include files question William Hubbs
  2013-09-15 23:35 ` Ian Stakenvicius
@ 2013-09-20 16:03 ` "Paweł Hajdan, Jr."
  2013-09-20 16:12   ` Peter Stuge
  1 sibling, 1 reply; 7+ messages in thread
From: "Paweł Hajdan, Jr." @ 2013-09-20 16:03 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 836 bytes --]

On 9/15/13 10:01 AM, William Hubbs wrote:
> All,
> 
> here is another question wrt OpenRC's api.
> 
> Currently we store two header files (rc.h and einfo.h) in /usr/include.
> Since we have more than one include file, wouldn't it be standard
> practice to store them in a sub directory of /usr/include?

I'm leaning towards having a directory for them like
/usr/include/openrc, but I'm also fine with having them in /usr/include .

It's not so much about standard practice, but even say avoiding file
collisions and weird issues with wrong headers being included
(especially rc.h seems to be a fairly generic name).

Also, it may be easier to change now when we only have two headers, than
later. And you may even add compatibility symlinks or copies in
/usr/include to give people more time to update.

Paweł



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] include files question
  2013-09-20 16:03 ` "Paweł Hajdan, Jr."
@ 2013-09-20 16:12   ` Peter Stuge
  2013-09-20 16:27     ` Michał Górny
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stuge @ 2013-09-20 16:12 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

"Paweł Hajdan, Jr." wrote:
> Also, it may be easier to change now when we only have two headers,
> than later. And you may even add compatibility symlinks or copies in
> /usr/include to give people more time to update.

I think you should rip off the band-aid quickly.

Move the files and update the .pc file. If someone is building
against openrc without using pkg-config then they should fix their
stuff. Putting $(shell pkg-config --cflags openrc) into a Makefile
is very easy.


//Peter

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] include files question
  2013-09-20 16:12   ` Peter Stuge
@ 2013-09-20 16:27     ` Michał Górny
  2013-09-20 16:39       ` "Paweł Hajdan, Jr."
  2013-09-21 11:00       ` Peter Stuge
  0 siblings, 2 replies; 7+ messages in thread
From: Michał Górny @ 2013-09-20 16:27 UTC (permalink / raw
  To: gentoo-dev; +Cc: peter

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

Dnia 2013-09-20, o godz. 18:12:17
Peter Stuge <peter@stuge.se> napisał(a):

> "Paweł Hajdan, Jr." wrote:
> > Also, it may be easier to change now when we only have two headers,
> > than later. And you may even add compatibility symlinks or copies in
> > /usr/include to give people more time to update.
> 
> I think you should rip off the band-aid quickly.
> 
> Move the files and update the .pc file. If someone is building
> against openrc without using pkg-config then they should fix their
> stuff. Putting $(shell pkg-config --cflags openrc) into a Makefile
> is very easy.

Putting another includedir is even worse kind of band-aid. If we're to
put them in a directory, I'd rather require 'more complete' includes,
like:

  #include <openrc/rc.h>

Otherwise, you're just fighting conflicts in the scope of a single
application.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] include files question
  2013-09-20 16:27     ` Michał Górny
@ 2013-09-20 16:39       ` "Paweł Hajdan, Jr."
  2013-09-21 11:00       ` Peter Stuge
  1 sibling, 0 replies; 7+ messages in thread
From: "Paweł Hajdan, Jr." @ 2013-09-20 16:39 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

On 9/20/13 9:27 AM, Michał Górny wrote:
> Putting another includedir is even worse kind of band-aid. If we're to
> put them in a directory, I'd rather require 'more complete' includes,
> like:
> 
>   #include <openrc/rc.h>
> 
> Otherwise, you're just fighting conflicts in the scope of a single
> application.

Exactly, with /usr/include/openrc added I think #includes should look
like above.

Paweł



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] include files question
  2013-09-20 16:27     ` Michał Górny
  2013-09-20 16:39       ` "Paweł Hajdan, Jr."
@ 2013-09-21 11:00       ` Peter Stuge
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Stuge @ 2013-09-21 11:00 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]

Michał Górny wrote:
> Putting another includedir is even worse kind of band-aid.

By using the expression band-aid I wasn't commenting on the virtues
of having the include file in /usr/include.

The expression "rip off the band-aid" is an idiom in english which
refers to minimizing the duration of unpleasantness by making a
change quickly and with determination.


> If we're to put them in a directory, I'd rather require
> 'more complete' includes, like:
> 
>   #include <openrc/rc.h>

Consider installs into non-/usr prefixes. It's true that this may not
be so much of a concern since openrc is mostly Gentoo-specific though.


> Otherwise, you're just fighting conflicts in the scope of a single
> application.

There are two benefits of mandating use of pkg-config; one is that
openrc will just work<tm> on odd platforms such as OS X package
managers where the install prefix isn't included in the platform
compiler's include search path, the other is that the API can be
versioned trivially, allowing different versions to be installed
at the same time.


//Peter

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-21 11:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-15 17:01 [gentoo-dev] include files question William Hubbs
2013-09-15 23:35 ` Ian Stakenvicius
2013-09-20 16:03 ` "Paweł Hajdan, Jr."
2013-09-20 16:12   ` Peter Stuge
2013-09-20 16:27     ` Michał Górny
2013-09-20 16:39       ` "Paweł Hajdan, Jr."
2013-09-21 11:00       ` Peter Stuge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox