summaryrefslogtreecommitdiff
blob: 88936cb5d4ca098bfd722f93e6dd365df9af6016 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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;
		
		}
		
	}

?>