Skip to content

pdist Fix excludes for running kernel #116

Merged
merged 1 commit into from
Jan 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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