From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:42983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmJaU-00067E-DJ for guix-patches@gnu.org; Wed, 23 Jan 2019 09:33:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmJaS-00014L-8a for guix-patches@gnu.org; Wed, 23 Jan 2019 09:33:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42885) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gmJaQ-000132-K1 for guix-patches@gnu.org; Wed, 23 Jan 2019 09:33:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gmJaQ-0001Xp-Eg for guix-patches@gnu.org; Wed, 23 Jan 2019 09:33:02 -0500 Subject: [bug#34154] [PATCH] /etc/os-release Resent-Message-ID: Date: Wed, 23 Jan 2019 14:32:03 +0000 From: ng0@n0.is Message-ID: <20190123143203.3yqtklffr3twr35i@uptimegirl.lan> References: <20190121101740.GB11658@macbook41> <87y37cjruq.fsf@gnu.org> <20190123072017.GA6135@macbook41> <87h8dzheyp.fsf@gnu.org> <87h8dz7gg5.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87h8dz7gg5.fsf@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ricardo Wurmus Cc: 34154@debbugs.gnu.org Ricardo Wurmus transcribed 722 bytes: > > Ludovic Courtès writes: > > >> It looks like some build systems can try to get information from it > >> during building if they have distro-specific things to do. > > > > That is precisely the kind of bad practice that I’d rather not > > encourage. :-) > > Build systems doing this is bad, of course, but if this was a script > that tried to be helpful by telling the user what commands to run to > install dependencies I think it could be helpful. > > (I have a vague memory of a project that tried to figure out how to > detect if the script is running on a Guix system by checking for > /run/current-system and the like.) It was PyBitmessage. https://github.com/Bitmessage/PyBitmessage/commit/b7e75b9bc51e7036045167ad6191fe339f1a9daa#diff-2eeaed663bd0d25b7e608891384b7298 Later on they realized this was a terrible idea. Maybe we could have a documentation section for 'best practices' to recommend against trying to detect Guix(SD) like this or rather provide positive examples? It's not our job, but people can get confused as PyBitmessage showed. > /etc/os-release would be a friendlier indicator than > /run/current-system. > > -- > Ricardo > > > > >