Project

General

Profile

« Previous | Next » 

Revision b0ec358d

Added by Ermal Luçi almost 16 years ago

Remove files before recreating them. Add filter rules early content to the file it was missing.

View differences:

etc/inc/pkg-utils.inc
990 990
function pkg_build_filter_rules() {
991 991
	global $config, $g;
992 992

  
993
	
993 994
	$pkgrules = "";
994 995
        $pkgrulesearly = "";
995 996
        $pkgnatrules = "";
996 997
        $pkgnatrulesearly = "";
997 998
        $pkgrdrrules = "";
998 999
        $pkgrdrrulesearly = "";
1000

  
1001
	@unlink("{$g['tmp_path']}/rules.natearly.packages");
1002
        @unlink("{$g['tmp_path']}/rules.nat.packages");
1003
        @unlink("{$g['tmp_path']}/rules.packages");
1004
        @unlink("{$g['tmp_path']}/rules.rdr.packages");
1005
        @unlink("{$g['tmp_path']}/rules.rdr.packages");
1006
        @unlink("{$g['tmp_path']}/rules.rulesearly.packages");
1007

  
999 1008
	if (is_array($config['installedpackages']['package'])) {
1000 1009
		run_plugins("/usr/local/pkg");
1001 1010
                foreach($config['installedpackages']['package'] as $pkg) {
......
1026 1035
                file_put_contents("{$g['tmp_path']}/rules.natearly.packages", $pkgnatrulesearly);
1027 1036
	if ($pkgnatrules <> "")
1028 1037
		file_put_contents("{$g['tmp_path']}/rules.nat.packages", $pkgnatrules);
1038
	if ($pkgrulesearly <> "")
1039
		file_put_contents("{$g['tmp_path']}/rules.rulesearly.packages", $pkgrulesearly);
1029 1040
	if ($pkgrules <> "")
1030
		file_put_contents("{$g['tmp_path']}/rules.packages", $pkgrules);
1041
                file_put_contents("{$g['tmp_path']}/rules.packages", $pkgrules);
1031 1042
	if ($pkgrdrrules <> "")
1032 1043
                file_put_contents("{$g['tmp_path']}/rules.rdr.packages", $pkgrdrrules);
1033 1044
	if ($pkgrdrrulesearly <> "")

Also available in: Unified diff