Rename package_exists() to pkgid_from_name()

Describe what this function actually does: Return the ID of a package
with a given name and return NULL if such a package doesn't exist.

The function name is chosen in a fashion similar to other functions from
"pkgfuncs.inc.php" (pkgname_from_id(), pkgnotify_from_sid(), ...).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-07-31 19:04:59 +02:00
parent 6ae2bc514f
commit 0ac8970b62
3 changed files with 4 additions and 4 deletions

View file

@ -34,7 +34,7 @@ foreach ($buckets as $bucket) {
continue;
}
$fullpath = INCOMING_DIR . $bucket . "/" . $pkgname;
if (!package_exists($pkgname) && is_dir($fullpath)) {
if (!pkgid_from_name($pkgname) && is_dir($fullpath)) {
echo 'Removing ' . $fullpath . "\n";
rm_tree($fullpath);
$count++;