Skip to content

Commit

Permalink
pdist Fix excludes for running kernel
Browse files Browse the repository at this point in the history
With commit baec330 ("pdist: Do not
delete running kernel") the removal of the files needed by the
running kernel was prevented by adding the relevant drectories to
the EXCEPTS array. This worked, however it also prevent pdist from
updating delivering any files into the excluded directories, e.g. after
an incomplete install by mariuxinstaller.

Do not prevent installs and updates of the directories used by the
running kernel. Do prevent their removal only.
  • Loading branch information
donald committed Jan 24, 2020
1 parent b71d255 commit 3455406
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions pdist/pdist
Original file line number Diff line number Diff line change
Expand Up @@ -651,20 +651,6 @@ sub prog_update

local($, , $\)=(' ',"\n");

if ($function == F_UPDATE) {
chomp (my $linux_version=`uname -r`); # '5.4.0-rc2.mx64.295'
if ($linux_version) {
my ($build) = $linux_version =~ /\.(\d+)$/;
push @EXCEPTS,
"/boot/mariux.$build",
"/boot/bzImage-$linux_version",
"/lib/modules/$linux_version",
"/boot/config-$linux_version",
"/boot/System.map-$linux_version",
"/usr/share/nvidia/kernel/$linux_version",
}
}

if ($tarfile && $tarfile ne '-') {
-d $TMPDIR or mkdir $TMPDIR or die $TMPDIR.": $!\n";
if (-d $TMPUPDDIR) {
Expand Down Expand Up @@ -796,7 +782,21 @@ sub prog_update

if ($function==F_UPDATE) {
if ($delete) {
my %except;
chomp (my $linux_version=`uname -r`); # '5.4.0-rc2.mx64.295'
if ($linux_version) {
my ($build) = $linux_version =~ /\.(\d+)$/;
%except=map {$_=>1} (
"/boot/mariux.$build",
"/boot/bzImage-$linux_version",
"/lib/modules/$linux_version",
"/boot/config-$linux_version",
"/boot/System.map-$linux_version",
"/usr/share/nvidia/kernel/$linux_version",
)
}
for my $path (keys %CLEAN) {
$except{$path} and next;
lstat $path or die "$path: $!\n";
if (-e _) {
if (-d _) {
Expand Down

0 comments on commit 3455406

Please sign in to comment.