From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aljosha Papsch Subject: Re: How to get the package metadata as structured data? Date: Fri, 05 Aug 2016 14:40:07 +0200 Message-ID: References: <87a8gss0mc.fsf@gnu.org> <56f534d8cd574be59d39ad3a3ca5a1b6@exchsrv2.sgc.loc> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----PMUD8LD6Q69NZG5ZQVB7XXPBITOSN2" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVeQY-0002e6-Vd for guix-devel@gnu.org; Fri, 05 Aug 2016 08:40:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVeQV-0006uI-KS for guix-devel@gnu.org; Fri, 05 Aug 2016 08:40:38 -0400 Received: from ara.uberspace.de ([95.143.172.149]:58459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVeQV-0006tu-89 for guix-devel@gnu.org; Fri, 05 Aug 2016 08:40:35 -0400 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: David Craven , "Cook, Malcolm" Cc: guix-devel ------PMUD8LD6Q69NZG5ZQVB7XXPBITOSN2 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 guix package prints its output in rec format. You can use recutils to process the output. Am 5. August 2016 13:04:49 MESZ, schrieb David Craven : >I aborted, since I realised that guix package -s doesn't include the >source url and hash, which would be important for a testsuite... > >Some interesting measurements: >guix package --list-available | grep -o --regex "^[a-zA-Z0-9-]*" | wc >-l >3797 > >cat guix-metadata.txt | grep --regex "^name: .*$" | wc -l >13949 > >looks like we have many package variants? > >and an example of what guix package -s guix exports > >guix package -s guix >name: guix >version: 0.10.0 >outputs: out >systems: x86_64-linux i686-linux armhf-linux mips64el-linux >dependencies: bzip2-1.0.6 emacs-magit-popup-2.7.0 emacs-minimal-24.5 >geiser-0.8.1 >+ gnutls-3.5.2 guile-2.0.11 guile-json-0.5.0 gzip-1.8 libgcrypt-1.7.0 >pkg-config-0.29 >+ sqlite-3.12.2 zlib-1.2.8 >location: gnu/packages/package-management.scm:71:2 >homepage: http://www.gnu.org/software/guix >license: GPL 3+ >synopsis: Functional package manager for installed software packages >and versions >description: GNU Guix is a functional package manager for the GNU >system, and is also >+ a distribution thereof. It includes a virtual machine image. >Besides the usual >+ package management features, it also supports transactional upgrades >and roll-backs, >+ per-user profiles, and much more. It is based on the Nix package >manager. > >name: guix >version: 0.10.0-1.97c8 >outputs: out >systems: x86_64-linux i686-linux armhf-linux mips64el-linux >dependencies: autoconf-wrapper-2.69 automake-1.15 bzip2-1.0.6 >emacs-magit-popup-2.7.0 >+ emacs-minimal-24.5 geiser-0.8.1 gettext-0.19.8 gnutls-3.5.2 >graphviz-2.38.0 >+ guile-2.0.11 guile-json-0.5.0 gzip-1.8 help2man-1.47.4 >libgcrypt-1.7.0 >+ pkg-config-0.29 sqlite-3.12.2 texinfo-6.1 zlib-1.2.8 >location: gnu/packages/package-management.scm:216:4 >homepage: http://www.gnu.org/software/guix >license: GPL 3+ >synopsis: Functional package manager for installed software packages >and versions >description: GNU Guix is a functional package manager for the GNU >system, and is also >+ a distribution thereof. It includes a virtual machine image. >Besides the usual >+ package management features, it also supports transactional upgrades >and roll-backs, >+ per-user profiles, and much more. It is based on the Nix package >manager. -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. ------PMUD8LD6Q69NZG5ZQVB7XXPBITOSN2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit guix package prints its output in rec format. You can use recutils to process the output.

Am 5. August 2016 13:04:49 MESZ, schrieb David Craven <david@craven.ch>:
I aborted, since I realised that guix package -s doesn't include the
source url and hash, which would be important for a testsuite...

Some interesting measurements:
guix package --list-available | grep -o --regex "^[a-zA-Z0-9-]*" | wc -l
3797

cat guix-metadata.txt | grep --regex "^name: .*$" | wc -l
13949

looks like we have many package variants?

and an example of what guix package -s guix exports

guix package -s guix
name: guix
version: 0.10.0
outputs: out
systems: x86_64-linux i686-linux armhf-linux mips64el-linux
dependencies: bzip2-1.0.6 emacs-magit-popup-2.7.0 emacs-minimal-24.5
geiser-0.8.1
+ gnutls-3.5.2 guile-2.0.11 guile-json-0.5.0 gzip-1.8 libgcrypt-1. 7.0
pkg-config-0.29
+ sqlite-3.12.2 zlib-1.2.8
location: gnu/packages/package-management.scm:71:2
homepage: http://www.gnu.org/software/guix
license: GPL 3+
synopsis: Functional package manager for installed software packages
and versions
description: GNU Guix is a functional package manager for the GNU
system, and is also
+ a distribution thereof. It includes a virtual machine image.
Besides the usual
+ package management features, it also supports transactional upgrades
and roll-backs,
+ per-user profiles, and much more. It is based on the Nix package manager.

name: guix
version: 0.10.0-1.97c8
outputs: out
systems: x86_64-linux i686-linux armhf-linux mips64el-linux
dependencies: autoconf-wrapper-2.69 automake-1.15 bzip2-1.0.6
emacs-magit-popup-2.7.0
+ emacs-m inimal-24.5 geiser-0.8.1 gettext-0.19.8 gnutls-3.5.2 graphviz-2.38.0
+ guile-2.0.11 guile-json-0.5.0 gzip-1.8 help2man-1.47.4 libgcrypt-1.7.0
+ pkg-config-0.29 sqlite-3.12.2 texinfo-6.1 zlib-1.2.8
location: gnu/packages/package-management.scm:216:4
homepage: http://www.gnu.org/software/guix
license: GPL 3+
synopsis: Functional package manager for installed software packages
and versions
description: GNU Guix is a functional package manager for the GNU
system, and is also
+ a distribution thereof. It includes a virtual machine image.
Besides the usual
+ package management features, it also supports transactional upgrades
and roll-backs,
+ per-user profiles, and much more. It is based on the Nix package manager.


--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. ------PMUD8LD6Q69NZG5ZQVB7XXPBITOSN2--