diff options
author | Brandon Amaro <omega13a@fedtrek.com> | 2020-05-18 01:49:36 -0700 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-05-18 10:57:35 +0200 |
commit | df3b2b652f29b74b524f3ceeb37169244ff5732f (patch) | |
tree | 51b09af155d4989f69bf6498d62e5b4538714fcd | |
parent | 895bc3dbd5dd48c97561bb0758f86a8c67bd6874 (diff) |
Bug fix and new features.
-rw-r--r-- | examples/librpm.php | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/examples/librpm.php b/examples/librpm.php index 98a7f8d..bed896e 100644 --- a/examples/librpm.php +++ b/examples/librpm.php @@ -59,22 +59,74 @@ abstract class Common { if (isset($this->info['Requirename'])) { return $this->_dep($this->info['Requirename'], $this->info['Requireflags'], $this->info['Requireversion']); } + else + { + return NULL; + } case 'Conflicts': if (isset($this->info['Conflictname'])) { return $this->_dep($this->info['Conflictname'], $this->info['Conflictflags'], $this->info['Conflictversion']); } + else + { + return NULL; + } case 'Obsoletes': if (isset($this->info['Obsoletename'])) { return $this->_dep($this->info['Obsoletename'], $this->info['Obsoleteflags'], $this->info['Obsoleteversion']); } + else + { + return NULL; + } case 'Provides': if (isset($this->info['Providename'])) { return $this->_dep($this->info['Providename'], $this->info['Provideflags'], $this->info['Provideversion']); } + else + { + return NULL; + } + case 'Recommends': + if (isset($this->info['Recommendname'])) { + return $this->_dep($this->info['Recommendname'], $this->info['Recommendflags'], $this->info['Recommendversion']); + } + else + { + return NULL; + } + case 'Suggests': + if (isset($this->info['Suggestname'])) { + return $this->_dep($this->info['Suggestname'], $this->info['Suggestflags'], $this->info['Suggestversion']); + } + else + { + return NULL; + } + case 'Supplements': + if (isset($this->info['Supplementname'])) { + return $this->_dep($this->info['Supplementname'], $this->info['Supplementflags'], $this->info['Supplementversion']); + } + else + { + return NULL; + } + case 'Enhances': + if (isset($this->info['Enhancename'])) { + return $this->_dep($this->info['Enhancename'], $this->info['Enhanceflags'], $this->info['Enhanceversion']); + } + else + { + return NULL; + } case 'Files': if (isset($this->info['Basenames'])) { return $this->_files(); } + else + { + return NULL; + } default: if (isset($this->info[$name])) { return $this->info[$name]; |