Skip to content

Commit

Permalink
ccm-purge: add support for selectable database backends
Browse files Browse the repository at this point in the history
ccm-purge was still assuming that the profile data was being stored in
GDBM. This updates the call to use the correct EDG::WP4::CCM::DB
indirection to handle all backends.

This fixes quattor#14 on github.
  • Loading branch information
ned21 committed Jan 3, 2014
1 parent 7fbfba2 commit b4a6051
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/bin/ccm-purge
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use GDBM_File;
use Errno qw(ESRCH EPERM);
use File::Path;
use EDG::WP4::CCM::CCfg qw(initCfg);
use EDG::WP4::CCM::DB;

#
# Global Variables
Expand Down Expand Up @@ -279,9 +280,9 @@ sub save_active_urls($) {
# delete($NonactiveURL{$md5});

# search URLs in fetch porperties

tie(%hash, "GDBM_File", "${CacheDir}/${profile}/eid2data.db", GDBM_READER,
0640) or die("${CacheDir}/${profile}/eid2data.db failed to open: $!");
my $readErr = EDG::WP4::CCM::DB::read(\%hash,
"${CacheDir}/${profile}/eid2data");
die("Failed to read eid2data: $readErr") if defined($readErr);

foreach $key ( keys(%hash) ) {
$ukey = unpack("L", $key);
Expand Down

0 comments on commit b4a6051

Please sign in to comment.