all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: "Fabián E. Gallina" <fgallina@gnu.org>, emacs-devel@gnu.org
Subject: Re: [elpa] master 872014e: Prevent accidental deletion of .git
Date: Wed, 25 Nov 2015 22:08:41 -0500	[thread overview]
Message-ID: <m3k2p54fuu.fsf@fitzsim.org> (raw)
In-Reply-To: <jwv4mgjmjrg.fsf-monnier+emacsdiffs@gnu.org> (Stefan Monnier's message of "Wed, 18 Nov 2015 10:10:26 -0500")

Hi Stefan,

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

[...]

> We'd also want to try and fix the directory-deletion code accordingly,
> so it's less trigger happy.

I've been looking at how to do this, but I'm not sure exactly what
you're after.  The following is from the perspective of "in place"
development.  For the deployment case, deletions etc. make perfect sense
since those scripts are operating on committed code.

There are lots of points where directory deletion happens in GNUmakefile
and archive-contents.el, during both "make externals" and "make
archive".

For "make archive", directory deletions all happen under "archive-tmp"
-- this is now enforced by my change to use cd ... && ... in the make
recipe.  The specific directory deletion that bit me is in
batch-make-achive:

    (progn ;; Negative version: don't publish this package yet!
      (message "Package %s not released yet!" dir)
      (delete-directory dir 'recursive))

To avoid `delete-directory' calls entirely, we could create archive-tmp
additively by only copying over releasable directories.  But then the
first step will still be "rm -rf archive-tmp" in the Makefile.  Do you
think it's worth the effort to rewrite this to do selective copying,
rather than just ensuring directory deletions only happen in
archive-tmp?

As for "make externals", I don't really like the concept of it, because
it mixes the build process with source configuration management.  For
example, this directory deletion could remove in-progress work from my
source directory, under elpa/packages:

   ;; Check if `dir' is under version control.
   ((not (zerop (call-process "git" nil nil nil
                              "ls-files" "--error-unmatch" dir)))
    (message "Deleted untracked package %s" dir)
    (delete-directory dir 'recursive t))

I would never expect that when invoking make.  I would rather "git
status" tell me that I have untracked changes.

I didn't closely follow the discussions while this was being designed.
Was there some reason to avoid git submodules?  It seems possible to
replace "make externals" with submodules that track "remote" externals/
branches of elpa.git itself, with git >= 1.8.2.  Then pure git
operations could be used to e.g. ensure a clean working tree, instead of
directory deletion Elisp.

Thomas



  parent reply	other threads:[~2015-11-26  3:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151109013124.17711.29422@vcs.savannah.gnu.org>
     [not found] ` <E1ZvbIq-0004cL-VV@vcs.savannah.gnu.org>
2015-11-09  1:58   ` [elpa] master 872014e: Prevent accidental deletion of .git Stefan Monnier
2015-11-09  4:49     ` Thomas Fitzsimmons
2015-11-09  5:03       ` Stefan Monnier
2015-11-09 16:07         ` Eli Zaretskii
2015-11-09 16:38           ` Artur Malabarba
2015-11-09 16:45             ` Eli Zaretskii
2015-11-09 20:20               ` Stefan Monnier
2015-11-18 14:39         ` Thomas Fitzsimmons
2015-11-18 15:10           ` Stefan Monnier
2015-11-18 16:44             ` Stephen Leake
2015-11-18 17:35             ` Eli Zaretskii
2015-11-26  3:08             ` Thomas Fitzsimmons [this message]
2015-11-26  3:55               ` Stefan Monnier
2015-11-26 14:34                 ` Thomas Fitzsimmons
2015-11-26 15:42                   ` Stefan Monnier
2015-11-27  6:58                     ` Thomas Fitzsimmons
2015-11-27 15:27                       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3k2p54fuu.fsf@fitzsim.org \
    --to=fitzsim@fitzsim.org \
    --cc=emacs-devel@gnu.org \
    --cc=fgallina@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.