all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Xinglu Chen <public@yoctocell.xyz>, 52774@debbugs.gnu.org
Subject: [bug#52774] [PATCH] import: elpa: Also check NonGNU ELPA for updates.
Date: Sun, 26 Dec 2021 14:08:18 +0100	[thread overview]
Message-ID: <a5e4601a008d00e2cedcc5f87e5ab2806bdd64ce.camel@gmail.com> (raw)
In-Reply-To: <87ee5zbknh.fsf@yoctocell.xyz>

Hi Xinglu,

Am Sonntag, dem 26.12.2021 um 13:44 +0100 schrieb Xinglu Chen:
> > > I am not sure I follow.  If ‘elpa-package?’ returned #f, the
> > > following would return #f.
> > > 
> > >   (member (elpa-package? pkg) '(gnu nongnu))
> > > 
> > > Meaning that PKG is not hosted on GNU or NonGNU ELPA, and thus,
> > > should not be checked for updates.
> > > 
> > > When including #f in the list, the value returned by the ‘member’
> > > expression would be '(#f), which means that PKG would be checked
> > > for updates, even though it shouldn’t.
> > I think you're misunderstanding what I'm saying, but that might be
> > because I worded it badly.  My suggestion was to make elpa-package?
> > a "predicate with meaning", which returns #f if PKG is not an ELPA
> > package, and a truthy value otherwise, said truthy value being the
> > symbol 'gnu or 'nongnu at the moment
> 
> That was what I had in mind as well, but I don’t see why we would
> need '(gnu nongnu #f) instead of just '(gnu nongnu).  If PKG is not
> in ELPA, we _don’t_ want to check for updates, and therefore, #f
> shouldn’t be a member of the list.
Because (eq? (elpa-package? NOT_AN_ELPA_PACKAGE) #f) needs to be
defined behaviour.

> I took a stab at the problem (patch attached below), and the result
> seems to be what would be expected.
> 
> --8<---------------cut here---------------start------------->8---
> $ ./pre-inst-env guix refresh -t elpa emacs-caml emacs-project emacs-
> helm
> gnu/packages/emacs-xyz.scm:10870:2: warning: no updater for emacs-
> helm                   ;github
> gnu/packages/emacs-xyz.scm:636:13: 0.8.1 is already the latest
> version of emacs-project  ;gnu
> gnu/packages/emacs-xyz.scm:2751:13: 4.9 is already the latest version
> of emacs-caml      ;nongnu
> --8<---------------cut here---------------end--------------->8---
In my personal opinion, elpa-repository as you defined it in that patch
would already be a valid value for the pred field of %elpa-updater. 
There is no need to define a procedure that does the member call and in
fact it makes it harder to update the updater, as now two locations
have to be updated.  If there is a requirement to only return #t or #f
we could make it (compose ->bool elpa-repository)

Cheers




  reply	other threads:[~2021-12-26 13:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24 11:25 [bug#52774] [PATCH] import: elpa: Also check NonGNU ELPA for updates Xinglu Chen
2021-12-24 12:17 ` Liliana Marie Prikler
2021-12-25  9:44   ` Xinglu Chen
2021-12-25 10:15     ` Liliana Marie Prikler
2021-12-25 14:31       ` Xinglu Chen
2021-12-25 15:23         ` Liliana Marie Prikler
2021-12-26 12:44           ` Xinglu Chen
2021-12-26 13:08             ` Liliana Marie Prikler [this message]
2022-01-05 22:18             ` bug#52774: " Ludovic Courtès
2022-01-05 23:03               ` [bug#52774] " Liliana Marie Prikler
2022-01-05 23:12                 ` Liliana Marie Prikler

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=a5e4601a008d00e2cedcc5f87e5ab2806bdd64ce.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=52774@debbugs.gnu.org \
    --cc=public@yoctocell.xyz \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.