Rewrite postinst to not require File::stat perl module (Closes: #756207).
svn path=/dists/sid/linux/; revision=21636
This commit is contained in:
parent
0b382b78f3
commit
40bf6c52bc
|
@ -5,6 +5,7 @@ linux (3.14.13-3) UNRELEASED; urgency=medium
|
||||||
#756049).
|
#756049).
|
||||||
* Update French debconf template translations (David Prévot) (Closes:
|
* Update French debconf template translations (David Prévot) (Closes:
|
||||||
#756134).
|
#756134).
|
||||||
|
* Rewrite postinst to not require File::stat perl module (Closes: #756207).
|
||||||
|
|
||||||
[ Ben Hutchings ]
|
[ Ben Hutchings ]
|
||||||
* [amd64] Reject x32 executables if x32 ABI not supported
|
* [amd64] Reject x32 executables if x32 ABI not supported
|
||||||
|
|
|
@ -5,7 +5,6 @@ use warnings;
|
||||||
use Cwd 'abs_path';
|
use Cwd 'abs_path';
|
||||||
use Debconf::Client::ConfModule qw(:all);
|
use Debconf::Client::ConfModule qw(:all);
|
||||||
use POSIX ();
|
use POSIX ();
|
||||||
use File::stat;
|
|
||||||
version('2.0');
|
version('2.0');
|
||||||
my $capb = capb('backup', 'escape');
|
my $capb = capb('backup', 'escape');
|
||||||
|
|
||||||
|
@ -552,9 +551,10 @@ else {
|
||||||
# of / are the same as that of /sbin/init. This may fail if not running as
|
# 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.
|
# root or if /proc is not mounted, in which case 2 is returned.
|
||||||
sub detect_chroot {
|
sub detect_chroot {
|
||||||
my $st1 = stat("/") or return 2;
|
my $dev1, $ino1, $dev2, $ino2;
|
||||||
my $st2 = stat("/proc/1/root") or return 2;
|
($dev1, $ino1) = stat("/") or return 2;
|
||||||
return ($st1->dev != $st2->dev) || ($st1->ino != $st2->ino);
|
($dev2, $ino2) = stat("/proc/1/root") or return 2;
|
||||||
|
return ($dev1 != $dev2) || ($ino1 != $ino2);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub is_package_installed {
|
sub is_package_installed {
|
||||||
|
|
Loading…
Reference in New Issue