From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#16826: Packages with same dependencies (name and version) fails to install Date: Fri, 21 Mar 2014 08:12:54 +0200 Message-ID: <87ob10nkpl.fsf@yandex.ru> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395382453 26298 80.91.229.3 (21 Mar 2014 06:14:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2014 06:14:13 +0000 (UTC) Cc: 16826-done@debbugs.gnu.org To: Johan Andersson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 21 07:14:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WQsii-0007Eg-T0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Mar 2014 07:14:21 +0100 Original-Received: from localhost ([::1]:50858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQsii-000666-C3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Mar 2014 02:14:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQsiY-00065q-Ri for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 02:14:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQsiR-0001tg-Hv for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 02:14:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQsiR-0001tY-Dj for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 02:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WQsiR-0003Vo-2R for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 02:14:03 -0400 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Mar 2014 06:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 16826 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 16826@debbugs.gnu.org, dgutov@yandex.ru, johan.rejeep@gmail.com Original-Received: via spool by 16826-done@debbugs.gnu.org id=D16826.139538239713416 (code D ref 16826); Fri, 21 Mar 2014 06:14:02 +0000 Original-Received: (at 16826-done) by debbugs.gnu.org; 21 Mar 2014 06:13:17 +0000 Original-Received: from localhost ([127.0.0.1]:42832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQshh-0003UJ-2p for submit@debbugs.gnu.org; Fri, 21 Mar 2014 02:13:17 -0400 Original-Received: from mail-ee0-f42.google.com ([74.125.83.42]:49210) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQshf-0003UA-7H for 16826-done@debbugs.gnu.org; Fri, 21 Mar 2014 02:13:15 -0400 Original-Received: by mail-ee0-f42.google.com with SMTP id d17so1409787eek.29 for <16826-done@debbugs.gnu.org>; Thu, 20 Mar 2014 23:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=7Cc3YV7WJtv1EOU9o+WUXX6p87pDYqmL/T7X2er4Pbc=; b=vXuUdufQwZTspFUS/hG9YVh01hUMRu3Ki5BrOb3eENHVgdGXir/KE2PyHUkZlxsikO HuCDhMhIyCzlQabx006xuSTXo7zaqMbNSOn4i9foftBbLCzo8UdMqa8y0zFqkNc1IVk3 2NvXGLlndRPvYXBRaYl+eDShb/bYOdYaGeV6F65xjIdye0/WjSVTCrY+EPCgsk1yd8ac /TJd1h4UMwWWuknejFfU5RKFTp+aZpNj/KZdA0z0URUmqvd8157HNM3SZ/u86Ywexnx6 6Ijx2wXj9weCJvA/qWrJ8CHlfdwb+WxbgBB/AqFTSPmG5QEgfXEf2rWg7hQ/jn4/r6DI Hxuw== X-Received: by 10.15.10.135 with SMTP id g7mr30875097eet.72.1395382394357; Thu, 20 Mar 2014 23:13:14 -0700 (PDT) Original-Received: from axl (93-121-245.netrun.cytanet.com.cy. [93.109.121.245]) by mx.google.com with ESMTPSA id g3sm9318301eet.35.2014.03.20.23.13.11 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 20 Mar 2014 23:13:13 -0700 (PDT) In-Reply-To: (Johan Andersson's message of "Thu, 20 Feb 2014 18:15:18 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87076 Archived-At: Version: 24.4 Johan Andersson writes: > Let's say I have three packages: foo, bar and baz. > > Package foo depends on bar-0.0.1 and baz-0.0.1. > Package bar depends on baz-0.0.1. > > It's important that foo and bar depends on the same baz version. > > If I install package foo, I will get the following error: > > "Need package `baz-0.0.1', but only 0.0.1 is available" Thanks for the report, should be fixed in 116817, branch emacs-24. Seems to have been a regression from revision 113174. Provided I didn't break anything else, the fix was pretty simple. > I have looked at the code of package.el and the code that throws the error > makes no sense to me. It works like this: > > We want to install a list of packages and a list of requirements. If we try > to install a requirement that is part of the list of packages, we set a > variable called already. If already is true, we check if the requirement > version is smaller than the already package version. If it is, we move that > package to the beginning of the packages list. If it is not smaller, the > error above is thrown. What? Why? I have no idea... Now it checks if the requirement version is smaller or equal. The package is moved to make the order of installation better (see the bug referenced in the comment), and if the requirement version is higher than the one scheduled to be installed, we're out of luck (but I've tweaked the error message a bit).