public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Resolving HAL vs. pciutils/usbutils
Date: Wed, 31 Oct 2007 10:46:29 +0000	[thread overview]
Message-ID: <47285D05.6090300@gentoo.org> (raw)
In-Reply-To: <20071031015605.GY22369@curie-int.orbis-terrarum.net>

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

Robin H. Johnson wrote:
> Heya,
> 
> So now this is not a flamewar.
> 
> Jakub was originally going to complain at me for the upstream usbutils
> adding support for gzipped usb.ids files, but a group of us (myself,
> dsd, jakub, leio, steev) had a discussion about it, and came up with a
> solution that both ends the breakage for direct users (HAL and others),
> and provides forward momentum.
> 
> So firstly, what's the real problem? The original complaint came up
> because HAL expected the uncompressed file to exist as pci.ids, and
> wasn't ready to look at pci.ids.gz. While this caused breakage, it was
> only a warning sign that there was a deeper problem.

I don't feel strongly enough to make an objection to your commit, but I 
think pciutils is doing the right thing, and despite me and Mike putting 
a hours into getting a decent HAL patch together the response I got was 
that as upstream they are simply "not interested" (no technical or 
logical objections provided), so I don't feel you should be putting 
workarounds in pciutils just to make HAL happy.

Especially because HAL really doesn't use pci.ids for anything useful. I 
am attaching a HAL ebuild patch which is the approach I'm in favour of 
and first mentioned several months ago. It does not require any HAL 
patches or pciutils modifications. It stems from the fact that really 
HAL doesn't really do anything useful with the ID-to-name mappings 
provided in pci.ids. It makes "that HAL bug" disappear with the click of 
the fingers. I didn't really get any proper answer why our HAL 
maintainers weren't keen on this when I first mentioned it.

Daniel

[-- Attachment #2: hal-ebuild.patch --]
[-- Type: text/plain, Size: 1578 bytes --]

--- hal-0.5.9-r1.ebuild.orig	2007-10-31 10:34:34.000000000 +0000
+++ hal-0.5.9-r1.ebuild	2007-10-31 10:46:15.000000000 +0000
@@ -80,13 +80,6 @@ function notify_inotify() {
 }
 
 pkg_setup() {
-	if ! built_with_use --missing false sys-apps/pciutils hal ; then
-		if built_with_use --missing false sys-apps/pciutils zlib ; then
-			eerror "You MUST build sys-apps/pciutils without the zlib USE flag"
-			die "You MUST build sys-apps/pciutils without the zlib USE flag"
-		fi
-	fi
-
 	if use kernel_linux; then
 		kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer"
 
@@ -147,6 +140,7 @@ src_unpack() {
 src_compile() {
 	local backend=""
 	local acpi=""
+	local myconf=""
 
 	# TODO :: policykit should have a pam useflag
 	append-flags -rdynamic
@@ -164,6 +158,15 @@ src_compile() {
 		acpi="--disable-acpi-proc --disable-acpi-acpid"
 	fi
 
+	if [[ ! -e "${ROOT}"/usr/share/misc/pci.ids ]]; then
+		myconf="--disable-pci-ids"
+		elog "It looks like you've built pciutils with the zlib USE flag"
+		elog "meaning that your /usr/share/misc/pci.ids file is compressed"
+		elog "and incompatible with HAL. You almost certainly won't notice "
+		elog "any feature loss here, but if you do, just re-emerge pciutils "
+		elog "without the zlib flag, then re-emerge hal."
+	fi
+
 	econf --disable-policy-kit \
 		  --docdir=/usr/share/doc/${PF} \
 		  --with-os-type=gentoo \
@@ -182,6 +185,7 @@ src_compile() {
 		  $(use_enable selinux) \
 		  --disable-console-kit \
 		  ${acpi} \
+		  $myconf \
 	|| die "configure failed"
 #$(use_enable pam console-kit)
 

  reply	other threads:[~2007-10-31 10:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  1:56 [gentoo-dev] Resolving HAL vs. pciutils/usbutils Robin H. Johnson
2007-10-31 10:46 ` Daniel Drake [this message]
2007-10-31 11:04   ` [gentoo-dev] " Guilherme Amadio
2007-10-31 11:31     ` Jan Kundrát
2007-10-31 13:30   ` Ryan Hill
2007-10-31 15:09   ` [gentoo-dev] " Wulf C. Krueger
2007-10-31 14:56     ` Daniel Drake
2007-10-31 15:40   ` Doug Goldstein
2007-10-31 16:12     ` Roy Marples
2007-10-31 17:07       ` Rémi Cardona
2007-10-31 16:26     ` Daniel Drake
2007-10-31 16:41       ` Jan Kundrát

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47285D05.6090300@gentoo.org \
    --to=dsd@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox