unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16826: Packages with same dependencies (name and version) fails to install
@ 2014-02-20 17:15 Johan Andersson
  2014-03-21  6:12 ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: Johan Andersson @ 2014-02-20 17:15 UTC (permalink / raw)
  To: 16826

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

Hi,

I have an issue with package.el in Emacs snapshot. Works fine in Emacs
24.3.1 and lower.

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"

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...

Is this a bug or did I miss something?

[-- Attachment #2: Type: text/html, Size: 1288 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#16826: Packages with same dependencies (name and version) fails to install
  2014-02-20 17:15 bug#16826: Packages with same dependencies (name and version) fails to install Johan Andersson
@ 2014-03-21  6:12 ` Dmitry Gutov
  2014-03-24  8:06   ` Johan Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Gutov @ 2014-03-21  6:12 UTC (permalink / raw)
  To: Johan Andersson; +Cc: 16826-done

Version: 24.4

Johan Andersson <johan.rejeep@gmail.com> 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).





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#16826: Packages with same dependencies (name and version) fails to install
  2014-03-21  6:12 ` Dmitry Gutov
@ 2014-03-24  8:06   ` Johan Andersson
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Andersson @ 2014-03-24  8:06 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 16826-done

[-- Attachment #1: Type: text/plain, Size: 1655 bytes --]

Can confirm that it works now, thanks for fixing it!


On Fri, Mar 21, 2014 at 7:12 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:

> Version: 24.4
>
> Johan Andersson <johan.rejeep@gmail.com> 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).
>

[-- Attachment #2: Type: text/html, Size: 2237 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-24  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-20 17:15 bug#16826: Packages with same dependencies (name and version) fails to install Johan Andersson
2014-03-21  6:12 ` Dmitry Gutov
2014-03-24  8:06   ` Johan Andersson

Code repositories for project(s) associated with this public inbox

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

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).