emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to build nongnu packages locally?


From: Stefan Monnier
Subject: Re: How to build nongnu packages locally?
Date: Fri, 30 Jun 2023 18:38:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> I'm having trouble building nongnu packages locally.  In particular, the
> packages which depend on GNU Elpa packages.  This is what I did:
>
>     $ git clone savannah/nongnu.git --depth=1 --single-branch
>     $ cd nongnu
>     $ make
>     $ make fetch/magit # magit depends on compat in GNU Elpa
>     $ make packages/magit # this sets up the worktree
>     $ make packages/magit # building magit fails
>
> The error message:
>
> --8<---------------cut here---------------start------------->8---
> Byte compiling packages/magit/lisp/git-commit.el
> Unable to activate package ‘magit’.
> Required package ‘compat-29.1.3.4’ is unavailable
>
> In toplevel form:
> packages/magit/lisp/git-commit.el:120:2: Error: Cannot open load file: No
> such file or directory, compat
> make: *** [GNUmakefile:119: packages/magit/lisp/git-commit.elc] Error 1
> --8<---------------cut here---------------end--------------->8---

Here's how I do it:

I have clone of both `elpa.git` and `nongnu.git` (in respectively
`elpa` and `nongnu` directories).  Then inside the `nongnu` directory,
next to the `packages` subdirectory, you need to add a symlink called
`other-packages` to the `.../elpa/packages` directory.

And the reverse is true as well to build some GNU ELPA packages since
GNU ELPA packages can also depend on NonGNU ELPA packages.

> The reason I want to build nongnu packages locally is because I am
> trying to set up a local Elpa repository (which may depend on packages
> on GNU or nongnu Elpa), and realized that it was unable to take
> dependencies from either, so I wanted to take inspiration from nongnu
> and see how it takes depencency from GNU Elpa.

The `other-packages` symlink is a hack which sadly doesn't extend
trivially to the case where you have more than 2 "repositories".
Patches to `elpa-admin` welcome to replace this hack with something
cleaner that can accommodate more use cases.

> PS: While testing it before sending the mail, I noticed that make does
> not error out if the fetch operation fails due to network issues.
> Please let me know if I should send this separately, and where I should
> send it (here or bug list?).

You can make a bug report, but make sure you keep me in the X-Debbugs-Cc.

> PS 2: I noticed that the initial "make" (pulling the elpa-admin branch
> of elpa.git) took some time to finish in my network environment.  Is
> there interest in implementing a shallow fetch, using something like
> --shallow-since, etc., when make receives a "shallow-since=..."  param?

That's weird.  It should be quite quick, normally.
What URL did you use?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]