From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Re: How do package.el handles "duplicate packages"? Date: Fri, 25 Nov 2022 00:58:39 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23718"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 25 04:59:45 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oyPsO-00060x-H3 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 25 Nov 2022 04:59:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyPrc-0006cb-S3; Thu, 24 Nov 2022 22:58:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyPrb-0006c8-8P for help-gnu-emacs@gnu.org; Thu, 24 Nov 2022 22:58:55 -0500 Original-Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyPrZ-0008KP-51 for help-gnu-emacs@gnu.org; Thu, 24 Nov 2022 22:58:54 -0500 Original-Received: by mail-io1-xd31.google.com with SMTP id r81so2325319iod.2 for ; Thu, 24 Nov 2022 19:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PS3n/0DSImi9Dd3ZrCytqi1JFmVWIr+SWHMcu09tsXw=; b=qhT0pN3U5tcMod6RnK0mbNCDeCi20lGFC2pkR10Pzyj0kuL3kIUQCFZwMGZFAKiiXt k/8V8eLo9RmPWCuLcrEDv17ujm/JezNn6g8Prb1xRanxGeLQrgRiMB3iDavle8F2xBj+ Q6FWUPeSKpY4V1e31aXRLp2NGLRjiGwtRqr7KD6OzU5bUgll7A3jCFjKbodfvHrKsmCs 8gVf5DetNcbFNJMyYQcM/GjV5OIfBnQ/4+4zpQNZFsqW6yG/LfmPA0D345yCjw3rwS7P e1z86k/m0klvumgsHS1Kr4oL1ONRVBF+DuPhkwikyoFX5/heVu/OZhEJy5r9izzUseY1 RGjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PS3n/0DSImi9Dd3ZrCytqi1JFmVWIr+SWHMcu09tsXw=; b=VoSOsCuSSCWyRk2aD1cCCK/gnHRmgUggX5kk2/z5LRClh7bbQHQo1LS4fjsepTV7AQ bMrz0EJXeaSAAdptl/yLbDmfMeMXoDvqks+HqlRI+f2iYCOqWvZpg9403G592vNCvfnM ISRf0ZxVa9TihfuIoqtrMNyReifgKZBo1LVDp/BoHLu44dlIDgaiuWEnoKiLb9L3j2jr dqpTG4OgR17dFXKrdwBCMiv9Fr9EyJ6Xcux7dkw1hQxbZ7OkMS+XBHMcf7FsJ9ap/3r4 pqfigltmHvs0Mfi8S24CMhLYDj8WiLkG1dEURTb+Ys+wgHdQU0PLH6ZYC8U486dvJGuG MiqA== X-Gm-Message-State: ANoB5pmA6Vvk79TYTsSEEAo2bv338wW3bycDMwnEoonncid4B/TXOO85 tCOgoNILM+k3NNcB0aP2B5lKp9j1Pjz7MwTzAcE= X-Google-Smtp-Source: AA0mqf4jQtRQSeGPodEe1QeZNi6L/LaPnrMDGNeOpHuj+M8VcEwbc106Z1xGqwpfgjynitr7X8UgKbwFRe6brb//skk= X-Received: by 2002:a02:6283:0:b0:363:f76f:16a0 with SMTP id d125-20020a026283000000b00363f76f16a0mr7426764jac.202.1669348731758; Thu, 24 Nov 2022 19:58:51 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d31; envelope-from=eduardoochs@gmail.com; helo=mail-io1-xd31.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141154 Archived-At: On Fri, 25 Nov 2022 at 00:05, Stefan Monnier via Users list for the GNU Emacs text editor wrote: > > More seriously, I don't think it's clearly documented there, so better > ask more precise questions. > > (...) > > As the docstring of `package-archive-contents` describes, there should > be only one entry for `afternoon-theme` but that entry should contain > two `package-desc` objects: one for Melpa and one for NonGNU. Ah, I missed that! Note that the current docstring doesn't mention that one of the entries is for nongnu and the other one is for melpa: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/package.el#n1513 (defvar package-archive-contents nil "Cache of the contents of all archives in `package-archives'. This is an alist mapping package names (symbols) to non-empty lists of `package-desc' structures.") Anyway, if I change the cl-loop in my previous e-mail to this, (setq my-ps (cl-loop for (name . pdescs) in package-archive-contents if (> (length pdescs) 1) collect (cons name pdescs))) it produces a list of the packages with duplicate entries, and I can use that to compare the two entries. Next question: is there a way to determine which of the entries - nongnu or melpa - corresponds to a version that is more recent? Thanks in advance! =) Eduardo Ochs http://angg.twu.net/#eev