From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: Guix-Help <help-guix@gnu.org>
Subject: Counting Packages yields wrong result
Date: Mon, 22 Aug 2016 23:10:44 +0200 [thread overview]
Message-ID: <20160822231044.4ac945f9@alma-ubu> (raw)
I tried to count the number of packages in GuixSD for myself, but my
result differs from the package list on the home page
(https://www.gnu.org/software/guix/packages/). Why?
Here is how I did it:
#!/run/current-system/profile/bin/guile -s
!#
; Counting number of packages in current system.
; This also includes packages with the same name,
; but different version string.
(use-modules (gnu))
(use-modules (guix))
(display "Number of packages: ")
(define cnt
(fold-packages
(lambda (pkg ctr)
(+ 1 ctr))
0))
(display cnt)
(newline)
Is that the correct way to walk through the list of packages anyway?
I always get the number 3747 back, even after a guix pull. The homepage
gives me 3881, and counting.
guix --version give me:
20160822.18
Looking at %load-path I figured out that
/run/current-system/profile/share/guile/site/2.0/guix
points to the ...guix-0.11.0-1 store path.
Is that my problem? How can I script over the newest pull?
Thank you,
Björn
next reply other threads:[~2016-08-22 21:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-22 21:10 Björn Höfling [this message]
2016-08-23 10:56 ` Counting Packages yields wrong result Alex Kost
2016-08-25 20:01 ` Björn Höfling
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160822231044.4ac945f9@alma-ubu \
--to=bjoern.hoefling@bjoernhoefling.de \
--cc=help-guix@gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).