GNU bug report logs - #45345
[elpa-archive] "make build/<package>" should not pull unconditionally

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Sun, 20 Dec 2020 20:32:02 UTC

Severity: normal

To reply to this bug, email your comments to 45345 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#45345; Package emacs. (Sun, 20 Dec 2020 20:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonas Bernoulli <jonas <at> bernoul.li>:
New bug report received and forwarded. Copy sent to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org. (Sun, 20 Dec 2020 20:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jonas Bernoulli <jonas <at> bernoul.li>
To: bug-gnu-emacs <at> gnu.org
Subject: [elpa-archive] "make build/<package>" should not pull unconditionally
Date: Sun, 20 Dec 2020 21:31:29 +0100
> - Another advantage is that the new code makes it much easier to build
>   your own tarballs, for example to test them before pushing to code.
>   You can just do `make build/[PKGNAME]` and the resulting package will
>   be built in `archive/[PKGNAME]-[VERSION].tar.

That almost worked. "make build/<package>" (or `elpaa--make-one-package')
calls `elpaa--external-package-sync', which pulls.  That of course is not
desirable when one wants to test some other revision of the package than
what would end up being pulled.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45345; Package emacs. (Sun, 20 Dec 2020 23:32:02 GMT) Full text and rfc822 format available.

Message #8 received at 45345 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: 45345 <at> debbugs.gnu.org
Subject: Re: bug#45345: [elpa-archive] "make build/<package>" should not
 pull unconditionally
Date: Sun, 20 Dec 2020 18:31:01 -0500
>> - Another advantage is that the new code makes it much easier to build
>>   your own tarballs, for example to test them before pushing to code.
>>   You can just do `make build/[PKGNAME]` and the resulting package will
>>   be built in `archive/[PKGNAME]-[VERSION].tar.
> That almost worked. "make build/<package>" (or `elpaa--make-one-package')
> calls `elpaa--external-package-sync', which pulls.  That of course is not
> desirable when one wants to test some other revision of the package than
> what would end up being pulled.

Could you give some detail about the situation in which doing `git pull`
was a problem for you?

I mean, obviously I could just move that call to
`elpaa--external-package-sync` elsewhere, but `elpaa--make-one-package'
is supposed to make packages from *commits* (it normally makes two
packages, one from the head of the branch and another from the last
commit that changed `Version:` line) so it "inherently" moves between
different commits.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45345; Package emacs. (Mon, 21 Dec 2020 10:48:02 GMT) Full text and rfc822 format available.

Message #11 received at 45345 <at> debbugs.gnu.org (full text, mbox):

From: Jonas Bernoulli <jonas <at> bernoul.li>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 45345 <at> debbugs.gnu.org
Subject: Re: bug#45345: [elpa-archive] "make build/<package>" should not
 pull unconditionally
Date: Mon, 21 Dec 2020 11:47:02 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> - Another advantage is that the new code makes it much easier to build
>>>   your own tarballs, for example to test them before pushing to code.
>>>   You can just do `make build/[PKGNAME]` and the resulting package will
>>>   be built in `archive/[PKGNAME]-[VERSION].tar.
>> That almost worked. "make build/<package>" (or `elpaa--make-one-package')
>> calls `elpaa--external-package-sync', which pulls.  That of course is not
>> desirable when one wants to test some other revision of the package than
>> what would end up being pulled.
>
> Could you give some detail about the situation in which doing `git pull`
> was a problem for you?

I was making some experimental changes.  In this case the changes where
to transient's internal tools responsible for updating version numbers
in the manual.  These tools are broken when used in a worktree of the
elpa repository because they relay in git tags, which do not exist here.

I did not want to push any of these very temporary experiments to the
public transient repository, just so elpa-archive could pull them from
there.

IMO its irrelevant what experiments I was running.  There will always
be things people will want to try out before making them public.

> I mean, obviously I could just move that call to
> `elpaa--external-package-sync` elsewhere, but `elpaa--make-one-package'
> is supposed to make packages from *commits* (it normally makes two
> packages, one from the head of the branch and another from the last
> commit that changed `Version:` line) so it "inherently" moves between
> different commits.

I dealt with that by creating a temporary dummy commit.  I also bumped
the Package-Version to some temporary fantasy number in that same
commit.  None of that I want to push to some public location just so I
can test locally.

     Jonas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45345; Package emacs. (Mon, 21 Dec 2020 14:34:02 GMT) Full text and rfc822 format available.

Message #14 received at 45345 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: 45345 <at> debbugs.gnu.org
Subject: Re: bug#45345: [elpa-archive] "make build/<package>" should not
 pull unconditionally
Date: Mon, 21 Dec 2020 09:33:20 -0500
> I was making some experimental changes.  In this case the changes where
> to transient's internal tools responsible for updating version numbers
> in the manual.  These tools are broken when used in a worktree of the
> elpa repository because they relay in git tags, which do not exist here.
>
> I did not want to push any of these very temporary experiments to the
> public transient repository, just so elpa-archive could pull them from
> there.

There's definitely no need to affect remote repositories.

Assuming you're using the "normal" setup where `packages/transient` is
a worktree, `elpaa--external-package-sync` won't actually fetch anything
from the remote server and will just do `git merge` which will
presumably do nothing at all unless you've `git fetched` something into
`origin/externals/transient` since the last sync or you manually moved
the `externals/transient` branch back to some earlier commit.

So, I think your diagnostic pointing at `elpaa--external-package-sync`
was a red herring and the problem is rather that:

>> `elpaa--make-one-package'
>> is supposed to make packages from *commits*

whereas you wanted to make a tarball from whatever was currently in
`packages/transient`, including uncommitted changes.  Is that right?

IOW the function that got in the way of your goal wasn't
`elpaa--external-package-sync` but `elpaa--clean`.

I think the solution will be to make a new kind of make target which
just builds one tarball and skips `elpaa--clean` (and will also skip
`elpaa--external-package-sync` while we're at it).


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45345; Package emacs. (Mon, 21 Dec 2020 17:27:01 GMT) Full text and rfc822 format available.

Message #17 received at 45345 <at> debbugs.gnu.org (full text, mbox):

From: Jonas Bernoulli <jonas <at> bernoul.li>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 45345 <at> debbugs.gnu.org
Subject: Re: bug#45345: [elpa-archive] "make build/<package>" should not
 pull unconditionally
Date: Mon, 21 Dec 2020 18:26:18 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> `elpaa--external-package-sync` won't actually fetch anything
> from the remote server and will just do `git merge` which will
> presumably do nothing at all unless you've `git fetched` something into
> `origin/externals/transient` since the last sync or you manually moved
> the `externals/transient` branch back to some earlier commit.

Now that you mention it, yes I did move back to some earlier commit.
I just tried with some new local-only commits and without rewinding
first and that indeed worked just fine.

I don't expect to rewind history going forward so this likely won't
cause me any issues anymore.  (I had to rewind because I had not yet
discarded the special "for-gnu-elpa" branch that moved the library to
the top-level.  In this case I did have to "rewrite history", but I
don't plan to do that again.)

> So, I think your diagnostic pointing at `elpaa--external-package-sync`
> was a red herring and the problem is rather that:
>
>>> `elpaa--make-one-package'
>>> is supposed to make packages from *commits*
>
> whereas you wanted to make a tarball from whatever was currently in
> `packages/transient`, including uncommitted changes.  Is that right?

No, I did in fact create a commit named "[WIP]".

> IOW the function that got in the way of your goal wasn't
> `elpaa--external-package-sync` but `elpaa--clean`.

Had I not created a commit, then yes, that would have been a problem,
but apparently I anticipated this complication. ;)

> I think the solution will be to make a new kind of make target which
> just builds one tarball and skips `elpaa--clean` (and will also skip
> `elpaa--external-package-sync` while we're at it).

Something like "make archive/<package>"
and "make archive-devel/<package>"?
That might be useful.

     Jonas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45345; Package emacs. (Tue, 22 Dec 2020 03:28:01 GMT) Full text and rfc822 format available.

Message #20 received at 45345 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: 45345 <at> debbugs.gnu.org
Subject: Re: bug#45345: [elpa-archive] "make build/<package>" should not
 pull unconditionally
Date: Mon, 21 Dec 2020 22:27:17 -0500
> Something like "make archive/<package>"
> and "make archive-devel/<package>"?
> That might be useful.

I pushed a patch such that you can now do

    make [PKGNAME].tar

and it will just (re)build that one tarball with whichever revision is
currently in `packages/[PKGNAME]`.


        Stefan





This bug report was last modified 3 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.