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

Re: emacsen-common 2.0.4 - acceptable for wheezy?



"Adam D. Barratt" <adam@adam-barratt.org.uk> writes:

> On Sun, 2012-12-09 at 17:03 -0600, Rob Browning wrote:
>> And when I submit 2.0.5 here, should I include the debdiff against
>> 2.0.4, or the full debdiff against what's currently in wheezy (i.e
>> including the 2.0.4 and 2.0.5 diffs)?
>
> We'd like at least the latter for review purposes; feel free to include
> an incremental debdiff as well if you think it'd help / be useful.

OK, so here's the new version (2.0.5).  Note that the new (2.0.5
specific) changes have also been examined and tested by Sébastien
Villemot, which you can see at the end of the bug thread here:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693472

Please let me know if I you think I should proceed with an upload to
unstable (for wheezy).

diff -Nru emacsen-common-2.0.3/debian/changelog emacsen-common-2.0.5/debian/changelog
--- emacsen-common-2.0.3/debian/changelog	2012-05-22 22:55:35.000000000 -0500
+++ emacsen-common-2.0.5/debian/changelog	2012-12-12 20:21:04.000000000 -0600
@@ -1,3 +1,42 @@
+emacsen-common (2.0.5) unstable; urgency=low
+
+  * Don't ignore dependency install scripts in emacs-package-install.  The
+    previous code didn't actually update the script name properly in the
+    loop where it was trying to install all of an add-on package's
+    dependencies.  As a result, none of the dependencies' install scripts
+    were actually invoked. Thanks to Sébastien Villemot
+    <sebastien@debian.org> for tracking down the problem, and providing
+    the patch. (closes: #693472)
+
+  * Invoke each add-on install script correctly as new-style or old-style.
+    Previously, emacs-package-install would invoke all of the add-on
+    install scripts in a dependency chain as either old-style or
+    new-style, based solely on whether or not the package that triggered
+    the install was old-style or new-style.  Now it should invoke each
+    package's install script based on whether or not the package itself is
+    new-style or old-style, as determined by the presence or absence of
+    the policy-required /usr/lib/emacsen-common/packages/compat/PACAKGE
+    file.  Thanks to Sébastien Villemot <sebastien@debian.org> for the
+    report.  (closes: #693472)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Wed, 12 Dec 2012 20:15:05 -0600
+
+emacsen-common (2.0.4) unstable; urgency=low
+
+  * Don't use the obsolete calc package as a policy example.
+    Thanks to "A. N. Other" <a.n.other.debian@gmail.com> for the report.
+    (closes: #674181)
+
+  * Don't override /usr/local/* load-path entries in debian-run-directories.
+    Previously, debian-run-directories would prepend all of the add-on
+    package paths to load-path, which meant that (in violation of Debian
+    policy) /usr/local wouldn't preceed the other entries.
+    Thanks to Hendrik Tews <hendrik@askra.de> for the report and Kevin
+    Ryde <user42@zip.com.au> for an initial suggested patch -- posted to
+    #454778. (closes: #676424)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 02 Dec 2012 16:03:18 -0600
+
 emacsen-common (2.0.3) unstable; urgency=low
 
   * Move #DEBHEPLER# up in the postinst to avoid an emacs complaint about
diff -Nru emacsen-common-2.0.3/debian-emacs-policy emacsen-common-2.0.5/debian-emacs-policy
--- emacsen-common-2.0.3/debian-emacs-policy	2012-05-14 19:00:38.000000000 -0500
+++ emacsen-common-2.0.5/debian-emacs-policy	2012-05-27 12:20:49.000000000 -0500
@@ -312,11 +312,9 @@
 
    It's been suggested, and is probably a good idea that maintainers
    switch to using autoload rather than load when possible in their
-   site-start.d files.
-
-   For example, instead of (load "some-package"), you should use
-   autoloads for all the top level, user visible functions.  Currently
-   the calc package has a good example of this.
+   site-start.d files.  For example, instead of (load "some-package"),
+   you should use autoloads for all the top level, user visible
+   functions.
 
 
 
diff -Nru emacsen-common-2.0.3/debian-startup.el emacsen-common-2.0.5/debian-startup.el
--- emacsen-common-2.0.3/debian-startup.el	2012-02-11 16:06:54.000000000 -0600
+++ emacsen-common-2.0.5/debian-startup.el	2012-12-02 19:20:28.000000000 -0600
@@ -73,14 +73,14 @@
     (nreverse result)))
 
 (defun debian-run-directories (&rest dirs)
-
   "Load each file of the form XXfilename.el or XXfilename.elc in any
 of the dirs, where XX must be a number.  The files will be run in
 alphabetical order.  If a file appears in more than one of the dirs,
 then the earlier dir takes precedence, and a .elc file always
 supercedes a .el file of the same name."
 
-  (let* ((paths dirs)
+  (let* ((paths (mapcar 'copy-sequence dirs)) ; Ensure we have unique objects.
+
          ;; Get a list of all the files in all the specified
          ;; directories that match the pattern.
          (files
@@ -89,10 +89,9 @@
                   (lambda (dir) 
                     (directory-files dir nil "^[0-9][0-9].*\\.elc?$" t))
                   paths)))
-         
+
          ;; Now strip the directory portion, remove any .el or .elc
          ;; extension.
-         
          (stripped-names
           (mapcar (lambda (file) 
                     (if (string-match "\\.el$" file)
@@ -105,34 +104,22 @@
                    files)))
          
          ;; Finally sort them, and delete duplicates
-         (base-names (debian-unique-strings (sort stripped-names 'string<)))
-         
-         (old-load-path load-path))
+         (base-names (debian-unique-strings (sort stripped-names 'string<))))
 
-    ;; Set a new load path with the directories specified in the
-    ;; proper order, and first.
-    (let ((new-path (append paths load-path)))
-      (setq load-path new-path)
-      ;; Now load the files.  "load" will make sure we get the byte
-      ;; compiled one first, if any, and will respect load-path's
-      ;; ordering.
-      (mapc
-       (lambda (file)
-         (condition-case err
-             (load file nil)
-           (error (message "Error while loading %s: %s"
-                           file (error-message-string err)))))
-       base-names)
-      ;; restore the old load-path -- including any new paths added by
-      ;; files loaded in directory traversal.
-      (let ((add-on-package-paths 
-             (delq nil (mapcar
-                        (lambda (item)
-                          (if (not (member item new-path))
-                              item
-                            nil))
-                        load-path))))      
-        (setq load-path (append add-on-package-paths old-load-path))))))
+    (setq load-path (append paths load-path)) ; Prefix paths temporarily.
+    ;; Now load the files.  "load" will make sure we get the byte
+    ;; compiled one first, if any, and will respect load-path's
+    ;; ordering.
+    (mapc
+     (lambda (file)
+       (condition-case err
+           (load file nil)
+         (error (message "Error while loading %s: %s"
+                         file (error-message-string err)))))
+     base-names)
+    ;; Remove the paths we inserted, and only those paths.
+    (dolist (item paths)
+      (setq load-path (remq item load-path)))))
 
 (defun debian-startup (flavor)
 
diff -Nru emacsen-common-2.0.3/emacs-package-install emacsen-common-2.0.5/emacs-package-install
--- emacsen-common-2.0.3/emacs-package-install	2012-05-22 22:13:36.000000000 -0500
+++ emacsen-common-2.0.5/emacs-package-install	2012-12-09 12:27:50.000000000 -0600
@@ -26,6 +26,12 @@
   }
 }
 
+sub is_new_pkg
+{
+  my($pkg) = @_;
+  return (-e  "$lib_dir/packages/compat/$pkg");
+}
+
 if(scalar(@ARGV) == 1)
 {
   $invoked_by_old_pkg = 1;
@@ -63,11 +69,12 @@
 # Get all the packages $pkg depends on, dependency sorted.
 my @pkgs_to_handle = generate_add_on_install_list([$pkg]);
 my @installed_flavors = get_installed_flavors();
-my $script = $lib_dir . "/packages/install/$pkg";
 
-if(!$invoked_by_old_pkg)
+foreach my $pkg (@pkgs_to_handle)
 {
-  foreach my $pkg (@pkgs_to_handle)
+  my $script = $lib_dir . "/packages/install/$pkg";
+
+  if(is_new_pkg($pkg))
   {
     foreach my $flavor (@installed_flavors)
     {
@@ -79,10 +86,7 @@
       }
     }
   }
-}
-else # $invoked_by_old_pkg
-{
-  foreach my $pkg (@pkgs_to_handle)
+  else # old pkg
   {
     print "Install $pkg for emacs\n";
     ex($script, 'emacs', @installed_flavors) if -e $script;
Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

Reply to: