From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MhhUF-0000OH-2Z for garchives@archives.gentoo.org; Sun, 30 Aug 2009 10:18:15 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B523DE0777; Sun, 30 Aug 2009 15:27:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 79775E0777 for ; Sun, 30 Aug 2009 15:27:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 2284C652D5 for ; Sun, 30 Aug 2009 15:27:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -2.546 X-Spam-Level: X-Spam-Status: No, score=-2.546 required=5.5 tests=[AWL=0.053, BAYES_00=-2.599] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KEXEp8TZOSjd for ; Sun, 30 Aug 2009 15:27:13 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 9CBA565287 for ; Sun, 30 Aug 2009 15:27:11 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1MhmJ0-0002oJ-Q4 for gentoo-dev@gentoo.org; Sun, 30 Aug 2009 17:26:58 +0200 Received: from ip68-231-21-207.ph.ph.cox.net ([68.231.21.207]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Aug 2009 17:26:58 +0200 Received: from 1i5t5.duncan by ip68-231-21-207.ph.ph.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Aug 2009 17:26:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Duncan <1i5t5.duncan@cox.net> Subject: [gentoo-dev] Re: About udev-145: new features / extras and kernel requirements Date: Sun, 30 Aug 2009 15:26:36 +0000 (UTC) Message-ID: References: <200908301611.53087.zzam@gentoo.org> <6f8b45100908300724h206273b0i9f36cbdf8ef9d271@mail.gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip68-231-21-207.ph.ph.cox.net User-Agent: Pan/0.133 (House of Butterflies) Sender: news Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 23adf123-ead0-4d4b-aa0f-364ed77f2fc1 X-Archives-Hash: 92d00452492769939d836cc9530c83b0 Arun Raghavan posted on Sun, 30 Aug 2009 19:54:47 +0530 as excerpted: > 2009/8/30 Matthias Schwarzott : >> Hi there! >> >> The new udev-145 and newer have some new kernel requirements. How >> should the ebuild verify they are met? >> Some possible ways: >> 1. Check config under /usr/src/linux >> 2. Check /proc/config.gz >> 3. Print message for user in pkg_postinst >=20 > All of the above? Rationale being (1) is required to check against the > kernel you're supposedly using, (2) for the kernel you definitely are > using, and (3) to make sure people remember. Indeed, all of the above, but not requiring the first two only giving=20 their status in #3. Some people don't have the kernel option enabling /proc/config.gz turned=20 on, so #2 isn't reliable, and #1, /usr/src/linux, could point who /knows/= =20 where, maybe something current, maybe not. (Here, it points at my local=20 kernel git repo... which may or may not correspond to the currently=20 running kernel, tho it's usually reasonably close, and it's usually=20 within a few days of upstream unless I'm git bisecting some bug.) Thus, neither of the first two is reliable, but checking them and putting= =20 the status in #3 should be helpful. Another alternative, ultimately safer: add another option, and require=20 that at least one of the three pass: 1-2 as they are. 3. Check UDEV_ASSUME_KERNEL_OPTS in the environment (could be set in=20 make.conf for portage and compatible PMs). Then in the message corresponding to the original #3 except presumably in= =20 unpack or prepare, report status as a reminder, and die if none of the=20 above tests pass. #3, the env var, would allow users to override without= =20 hacking the ebuild itself, if for some reason they decided they needed=20 to. If it's the only one that passes, ewarn/eerror to the effect=20 "Relying on UDEV_ASSUME_KERNEL_OPTS override. If it breaks, you get to=20 keep the pieces!" --=20 Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman