← Back to team overview

registry team mailing list archive

[Bug 574244] Re: etckeeper hook breaks upgrade with "Argument list too long"

 

Proposed patch

** Description changed:

  Binary package hint: etckeeper
  
  I just executed distribution upgrade from 9.04 to 9.10.
  
  The upgrade failed nearby the end because of etckeeper failure. I don't
  remember exact message but it was about command line being too long (I
  suspect bzr command was executed with all changed etc files, which are
  numerous)
  
  Definitely deserves some thought.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 10.04
  Package: etckeeper 0.41ubuntu3
  ProcVersionSignature: Ubuntu 2.6.31-21.59-generic
  Uname: Linux 2.6.31-21-generic x86_64
  NonfreeKernelModules: nvidia
  Architecture: amd64
  Date: Mon May  3 09:21:23 2010
  InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
  PackageArchitecture: all
  ProcEnviron:
-  PATH=(custom, no user)
-  LANG=en_US.UTF-8
-  SHELL=/bin/bash
+  PATH=(custom, no user)
+  LANG=en_US.UTF-8
+  SHELL=/bin/bash
  SourcePackage: etckeeper
+ 
+ == SRU Report ==
+ Impact:
+ If the user has thousands of package installed and upgrades to a new release, etckeeper tries to commit after the apt run with a commit message that is too long, resulting in an upgrade failure.
+ 
+ Development branch fix:
+ Version 0.46 fixed the issue by adding support for --stdin and making etckeeper use it for post-install.d commit messages, so it is no longer subject to the issue.
+ 
+ Minimal patch:
+ Backporting the fix from 0.46 would result IMHO in a significant patch that also introduces features (--stdin), so this SRU proposes to truncate the commit message instead after 2000 lines. That's an improvement on the current situation (where the message would be completely lost) and avoids the upgrade failure message. See attached in comment 6.
+ 
+ TEST CASE:
+ This is relatively tricky to reproduce, since this requires to have a very large number of packages installed.
+ - Install karmic
+ - Install etckeeper
+ - Install > 3000 packages
+ - Upgrade to lucid
+ Without fix: upgrade fails at the end with "Argument list too long"
+ With fix: upgrade does not fail at the end
+ 
+ Regression potential:
+ This patch conservatively truncates the message after 2000 lines. There might have been cases where more than 2000 packages were installed, where the etckeeper commit message would still not generate an error on upgrade. For the few users in that case, some lines at the end of the commit message would be lost. It does not change behavior for users upgrading less than 2000 packages at once, and avoids losing all the message for those that exceeded the limit.

** Attachment added: "patch"
   http://launchpadlibrarian.net/50072965/patch

-- 
etckeeper hook breaks upgrade with "Argument list too long"
https://bugs.launchpad.net/bugs/574244
You received this bug notification because you are a member of Registry
Administrators, which is the registrant for Debian.