diff options
author | Steve Dibb <beandog@gentoo.org> | 2009-12-15 20:49:23 +0000 |
---|---|---|
committer | Steve Dibb <beandog@gentoo.org> | 2009-12-15 20:49:23 +0000 |
commit | 02b91d354e1b212418d8c512592d34e723b6126a (patch) | |
tree | 887d9abffba7b826696820d3d91bcc0df15a60d0 /class.portage.package.mask.php | |
parent | initial commit (diff) | |
download | znurt-org-backend-02b91d354e1b212418d8c512592d34e723b6126a.tar.gz znurt-org-backend-02b91d354e1b212418d8c512592d34e723b6126a.tar.bz2 znurt-org-backend-02b91d354e1b212418d8c512592d34e723b6126a.zip |
git-svn-id: file:///var/svn/portage@2 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
Diffstat (limited to 'class.portage.package.mask.php')
-rw-r--r-- | class.portage.package.mask.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/class.portage.package.mask.php b/class.portage.package.mask.php new file mode 100644 index 0000000..88936cb --- /dev/null +++ b/class.portage.package.mask.php @@ -0,0 +1,38 @@ +<? + + class PackageMask extends PortageTree { + + + private $filename; + + function __construct($profile = 'portage') { + + parent::__construct(); + + switch($profile) { + + case 'portage': + $filename = 'package.mask'; + break; + + } + + $this->filename = $this->getTree()."/profiles/$filename"; + + } + + function getMaskedPackages() { + + $arr = file($this->filename, FILE_IGNORE_NEW_LINES); + + $arr = preg_grep("/(^#|^$)/", $arr, PREG_GREP_INVERT); + + sort($arr); + + return $arr; + + } + + } + +?>
\ No newline at end of file |