[Bug 942940] [NEW] precise base-files /var/run migrate_dir fails on pkg configure

Tom Gall tom_gall at mac.com
Tue Feb 28 22:50:19 UTC 2012


Public bug reported:


Using precise, multistrap and live-build to build Linaro images, we have noted the following bug in base-files.  In debian/postinst.in on line 26 we have


     26 migrate_directory() {
     27   if [ ! -L $1 ]; then
     28     rmdir $1
     29     ln -s $2 $1
     30   fi
     31 }


Note that due to multistrap later on in this same file line 55, will fail cause when the dpkg --configure -a step happens /var/run already exists and is not certain to be empty causing rmdir to fail.. 

     54   install_directory run/lock 1777 root
     55   migrate_directory /var/run /run


The directory as part of the configure step can be safely blow away. Thus the fix recommended is :

     26 migrate_directory() {
     27   if [ ! -L $1 ]; then
     28     rm -rf $1
     29     ln -s $2 $1
     30   fi
     31 }

Please apply.

** Affects: base-files (Ubuntu)
     Importance: Undecided
         Status: New

** Package changed: insserv (Ubuntu) => base-files (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/942940

Title:
  precise base-files /var/run migrate_dir fails on pkg configure

Status in “base-files” package in Ubuntu:
  New

Bug description:
  
  Using precise, multistrap and live-build to build Linaro images, we have noted the following bug in base-files.  In debian/postinst.in on line 26 we have

  
       26 migrate_directory() {
       27   if [ ! -L $1 ]; then
       28     rmdir $1
       29     ln -s $2 $1
       30   fi
       31 }

  
  Note that due to multistrap later on in this same file line 55, will fail cause when the dpkg --configure -a step happens /var/run already exists and is not certain to be empty causing rmdir to fail.. 

       54   install_directory run/lock 1777 root
       55   migrate_directory /var/run /run

  
  The directory as part of the configure step can be safely blow away. Thus the fix recommended is :

       26 migrate_directory() {
       27   if [ ! -L $1 ]; then
       28     rm -rf $1
       29     ln -s $2 $1
       30   fi
       31 }

  Please apply.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/942940/+subscriptions




More information about the foundations-bugs mailing list