diff options
author | Steve Dibb <beandog@gentoo.org> | 2010-01-02 19:56:55 +0000 |
---|---|---|
committer | Steve Dibb <beandog@gentoo.org> | 2010-01-02 19:56:55 +0000 |
commit | f83f1aea639b708cef7bad495e557bed5404bdce (patch) | |
tree | dc9af9b03c05d1a4ec784d539b4c65c00806a293 /import.final.php | |
parent | less verbose (diff) | |
download | znurt-org-backend-f83f1aea639b708cef7bad495e557bed5404bdce.tar.gz znurt-org-backend-f83f1aea639b708cef7bad495e557bed5404bdce.tar.bz2 znurt-org-backend-f83f1aea639b708cef7bad495e557bed5404bdce.zip |
only update package masks if package.mask filemtime has changed
git-svn-id: file:///var/svn/portage@46 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
Diffstat (limited to 'import.final.php')
-rw-r--r-- | import.final.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/import.final.php b/import.final.php index 2f06950..a407695 100644 --- a/import.final.php +++ b/import.final.php @@ -1,8 +1,5 @@ <? - $verbose = true; - $qa = true; - require_once 'header.php'; // Reset packages that were updated @@ -40,6 +37,22 @@ $sql = "UPDATE package_recent SET status = 0 WHERE status = 1;"; $db->query($sql); } + + // Check for package_mask replacements + $sql = "SELECT COUNT(1) FROM package_mask WHERE status = 1;"; + $count = $db->getOne($sql); + + if($count) { + // Foreign key will remove any ebuild_mask entries as well + $sql = "DELETE FROM package_mask WHERE status = 0;"; + $db->query($sql); + + $sql = "UPDATE package_mask SET status = 0 WHERE status = 1;"; + $db->query($sql); + + $sql = "UPDATE ebuild_mask SET status = 0 WHERE status = 1;"; + $db->query($sql); + } ?>
\ No newline at end of file |