chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Documentation: dgit(1): Remove some obsolete caveats from BUGS.
[dgit.git]
/
Debian
/
Dgit
/
Policy
/
Debian.pm
diff --git
a/Debian/Dgit/Policy/Debian.pm
b/Debian/Dgit/Policy/Debian.pm
index 03118b1d5ebbfe78a16ab37f314fd0afe045246a..12f1ee11a9418ce6031e0c12b1fb5f0312790b40 100644
(file)
--- a/
Debian/Dgit/Policy/Debian.pm
+++ b/
Debian/Dgit/Policy/Debian.pm
@@
-27,12
+27,15
@@
sub poldb_path ($) {
return "$repos/policy.sqlite3";
}
return "$repos/policy.sqlite3";
}
-sub poldb_setup ($) {
- my ($policydb) = @_;
+sub poldb_setup ($
;$
) {
+ my ($policydb
, $hook
) = @_;
$poldbh ||= DBI->connect("dbi:SQLite:$policydb",'','', {
RaiseError=>1, PrintError=>1, AutoCommit=>0
});
$poldbh ||= DBI->connect("dbi:SQLite:$policydb",'','', {
RaiseError=>1, PrintError=>1, AutoCommit=>0
});
+
+ $hook->() if $hook;
+
$poldbh->do("PRAGMA foreign_keys = ON");
}
$poldbh->do("PRAGMA foreign_keys = ON");
}