[kernel] r21636 - in dists/sid/linux/debian: . templates

Aurelien Jarno aurel32 at moszumanska.debian.org
Sun Jul 27 18:02:29 UTC 2014


Author: aurel32
Date: Sun Jul 27 18:02:28 2014
New Revision: 21636

Log:
Rewrite postinst to not require File::stat perl module (Closes: #756207).

Modified:
   dists/sid/linux/debian/changelog
   dists/sid/linux/debian/templates/image.plain.postinst.in

Modified: dists/sid/linux/debian/changelog
==============================================================================
--- dists/sid/linux/debian/changelog	Sun Jul 27 11:58:41 2014	(r21635)
+++ dists/sid/linux/debian/changelog	Sun Jul 27 18:02:28 2014	(r21636)
@@ -5,6 +5,7 @@
     #756049).
   * Update French debconf template translations (David Prévot) (Closes:
     #756134).
+  * Rewrite postinst to not require File::stat perl module (Closes: #756207).
 
   [ Ben Hutchings ]
   * [amd64] Reject x32 executables if x32 ABI not supported

Modified: dists/sid/linux/debian/templates/image.plain.postinst.in
==============================================================================
--- dists/sid/linux/debian/templates/image.plain.postinst.in	Sun Jul 27 11:58:41 2014	(r21635)
+++ dists/sid/linux/debian/templates/image.plain.postinst.in	Sun Jul 27 18:02:28 2014	(r21636)
@@ -5,7 +5,6 @@
 use Cwd 'abs_path';
 use Debconf::Client::ConfModule qw(:all);
 use POSIX ();
-use File::stat;
 version('2.0');
 my $capb = capb('backup', 'escape');
 
@@ -552,9 +551,10 @@
 # of / are the same as that of /sbin/init. This may fail if not running as
 # root or if /proc is not mounted, in which case 2 is returned.
 sub detect_chroot {
-  my $st1 = stat("/") or return 2;
-  my $st2 = stat("/proc/1/root") or return 2;
-  return ($st1->dev != $st2->dev) || ($st1->ino != $st2->ino);
+  my $dev1, $ino1, $dev2, $ino2;
+  ($dev1, $ino1) = stat("/") or return 2;
+  ($dev2, $ino2) = stat("/proc/1/root") or return 2;
+  return ($dev1 != $dev2) || ($ino1 != $ino2);
 }
 
 sub is_package_installed {



More information about the Kernel-svn-changes mailing list