Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better DSM 7 support #88

Merged
merged 2 commits into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion lib/SSpkS/Package/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @property string $maintainer_url URL of maintainer's web page
* @property string $distributor Package distributor
* @property string $distributor_url URL of distributor's web page
* @property string $support_url URL of support web page
* @property string $support_url URL of support web page
* @property array $arch List of supported architectures, or 'noarch'
* @property array $thumbnail List of thumbnail files
* @property array $thumbnail_url List of thumbnail URLs
Expand Down Expand Up @@ -171,6 +171,10 @@ private function collectMetadata()
$this->metadata['qinst'] = !empty($this->metadata['qinst']) ? $this->parseBool($this->metadata['qinst']) : $qValue;
$this->metadata['qupgrade'] = !empty($this->metadata['qupgrade']) ? $this->parseBool($this->metadata['qupgrade']) : $qValue;
$this->metadata['qstart'] = !empty($this->metadata['qstart']) ? $this->parseBool($this->metadata['qstart']) : $qValue;

if (isset($this->metadata['os_min_ver'])) {
$this->metadata['firmware'] = $this->metadata['os_min_ver'];
}
}

/**
Expand Down
3 changes: 2 additions & 1 deletion lib/SSpkS/Package/PackageFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ public function isMatchingFirmwareVersion(\SSpkS\Package\Package $package): bool
private function isMatchingFirmwareVersionPre7(\SSpkS\Package\Package $package): bool
{
// on DSM6 or less, package must be <= to filter
return version_compare($package->firmware, /** @scrutinizer ignore-type */ $this->filterFwVersion, '<=');
return version_compare($package->firmware, /** @scrutinizer ignore-type */ '7', '<')
&& version_compare($package->firmware, /** @scrutinizer ignore-type */ $this->filterFwVersion, '<=');
}

private function isMatchingFirmwareVersionPost7(\SSpkS\Package\Package $package): bool
Expand Down