[open-ils-commits] r9936 - in branches/acq-experiment: .
Evergreen/src/extras/import Open-ILS/src/extras
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher
Open-ILS/src/perlmods/OpenILS/WWW
Open-ILS/src/perlmods/OpenILS/WWW/SuperCat Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jun 26 10:01:09 EDT 2008
Author: erickson
Date: 2008-06-26 10:01:03 -0400 (Thu, 26 Jun 2008)
New Revision: 9936
Modified:
branches/acq-experiment/
branches/acq-experiment/Evergreen/src/extras/import/quick_metarecord_map.sql
branches/acq-experiment/Open-ILS/src/extras/Makefile.install
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
branches/acq-experiment/Open-ILS/src/sql/Pg/020.schema.functions.sql
Log:
Merged revisions 9912,9914,9918-9919,9925,9931,9934 via svnmerge from
svn://svn.open-ils.org/ILS/trunk
........
r9912 | dbs | 2008-06-22 23:04:30 -0400 (Sun, 22 Jun 2008) | 2 lines
Another constraint that needs to be DEFERRED INITIALLY DEFERRED
........
r9914 | miker | 2008-06-22 23:25:17 -0400 (Sun, 22 Jun 2008) | 1 line
explicit casts to support pg 8.3
........
r9918 | dbs | 2008-06-24 11:25:20 -0400 (Tue, 24 Jun 2008) | 2 lines
Add libmemcache and ncurses dependencies on CentOS/RHEL
........
r9919 | dbs | 2008-06-24 14:35:31 -0400 (Tue, 24 Jun 2008) | 3 lines
Add /usr/local/lib to ldconfig on CentOS/RHEL if not already there;
avoids "missing rpl_malloc" error which is rather difficult to debug
........
r9925 | miker | 2008-06-25 12:33:42 -0400 (Wed, 25 Jun 2008) | 1 line
add item and feed ids where appropriate
........
r9931 | miker | 2008-06-25 20:55:58 -0400 (Wed, 25 Jun 2008) | 1 line
proper support for counting short-duration overdue circs
........
r9934 | miker | 2008-06-26 08:47:09 -0400 (Thu, 26 Jun 2008) | 1 line
array_accum defined in the new aggregate function file
........
Property changes on: branches/acq-experiment
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-9909
+ /trunk:1-9935
Modified: branches/acq-experiment/Evergreen/src/extras/import/quick_metarecord_map.sql
===================================================================
--- branches/acq-experiment/Evergreen/src/extras/import/quick_metarecord_map.sql 2008-06-26 13:14:10 UTC (rev 9935)
+++ branches/acq-experiment/Evergreen/src/extras/import/quick_metarecord_map.sql 2008-06-26 14:01:03 UTC (rev 9936)
@@ -18,7 +18,7 @@
FROM biblio.record_entry b
JOIN metabib.metarecord m ON (m.fingerprint = b.fingerprint);
-ALTER TABLE metabib.metarecord_source_map ADD CONSTRAINT metabib_metarecord_source_map_metarecord_fkey FOREIGN KEY (metarecord) REFERENCES metabib.metarecord (id);
+ALTER TABLE metabib.metarecord_source_map ADD CONSTRAINT metabib_metarecord_source_map_metarecord_fkey FOREIGN KEY (metarecord) REFERENCES metabib.metarecord (id) DEFERRABLE INITIALLY DEFERRED;
COMMIT;
Modified: branches/acq-experiment/Open-ILS/src/extras/Makefile.install
===================================================================
--- branches/acq-experiment/Open-ILS/src/extras/Makefile.install 2008-06-26 13:14:10 UTC (rev 9935)
+++ branches/acq-experiment/Open-ILS/src/extras/Makefile.install 2008-06-26 14:01:03 UTC (rev 9936)
@@ -58,6 +58,10 @@
EJABBERD_PKG=ejabberd-2.0.1_2-linux-x86-installer.bin
EJABBERD_HOST=http://www.process-one.net/downloads/ejabberd
+# libmemcache is not packaged on CentOS/RHEL
+LIBMEMCACHE=libmemcache-1.4.0.rc2
+LIBMEMCACHE_HOST=http://people.freebsd.org/~seanc/libmemcache/
+
# Business::OnlinePayment is not packaged on CentOS/RHEL
PAY_ONLINE=Business-OnlinePayment-3.00_08.tar.gz
PAY_ONLINE_HOST=http://ftp.perl.org/pub/CPAN/authors/id/I/IV/IVAN/
@@ -150,6 +154,8 @@
make \
mod_perl \
mod_ssl \
+ ncurses \
+ ncurses-devel \
ntp \
perl-DBD-Pg \
perl-DBI \
@@ -304,7 +310,8 @@
# these should be the same for any distro
install: install_yaz install_cpan install_js_sm install_libdbi
-centos: install_centos_pgsql install_centos_rpms install_ejabberd install install_libxml2 install_libxslt install_centos_perl
+centos: install_centos_pgsql install_centos_rpms install_ejabberd install_libmemcache install install_libxml2 install_libxslt install_centos_perl create_ld_local
+
debian: install_pgsql_debian install_debs install debian_sys_config
gentoo: install_gentoos install_gentoo_rc install_gentoo_perl install
@@ -327,6 +334,12 @@
chmod u+x $(EJABBERD_PKG).gz
./$(EJABBERD_PKG) --mode unattended --prefix /opt/ejabberd --adminpw evergreen
+# Install libmemcache from the official project source
+install_libmemcache:
+ if [ ! -d $(LIBMEMCACHE) ]; then wget $(LIBMEMCACHE_HOST)/$(LIBMEMCACHE).tar.bz2; fi;
+ tar xjf $(LIBMEMCACHE).tar.bz2
+ cd $(LIBMEMCACHE) && ./configure && make && make install
+
# Install a newer version of libxslt
install_libxslt:
if [ ! -d $(XSLT) ]; then wget $(XSLT_HOST)/$(XSLT).tar.gz; fi;
@@ -431,3 +444,10 @@
for m in $(CENTOS_PERL_NOTEST); do perl -MCPAN -e "CPAN::Shell->notest('install', \"$$m\";"; done
for m in $(CENTOS_PERL_LOCAL); do LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib perl -MCPAN -e "install \"$$m\";"; done
+# We need to add /usr/local/lib to the ldconfig list of directories on CentOS,
+# if it is not already there
+create_ld_local:
+ if [ "$$(ldconfig -v 2> /dev/null | grep '^/usr/local/lib' | wc -l)" -eq 0 ]; then \
+ echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \
+ ldconfig; \
+ fi;
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2008-06-26 13:14:10 UTC (rev 9935)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2008-06-26 14:01:03 UTC (rev 9936)
@@ -56,6 +56,12 @@
SELECT id
FROM action.circulation
WHERE usr = ? AND checkin_time IS NULL AND due_date >= 'today' AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
+ WHERE usr = ?
+ AND checkin_time IS NULL
+ AND ( (fine_interval >= '1 day' AND due_date >= 'today')
+ OR (fine_interval < '1 day' AND due_date > 'now' ))
+ AND (stop_fines IS NULL
+ OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
SQL
my $out = actor::user->db_Main->selectcol_arrayref($out_sql, {}, $usr);
@@ -63,7 +69,12 @@
my $od_sql = <<" SQL";
SELECT id
FROM action.circulation
- WHERE usr = ? AND checkin_time IS NULL AND due_date < 'today' AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
+ WHERE usr = ?
+ AND checkin_time IS NULL
+ AND ( (fine_interval >= '1 day' AND due_date < 'today')
+ OR (fine_interval < '1 day' AND due_date < 'now' ))
+ AND (stop_fines IS NULL
+ OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
SQL
my $od = actor::user->db_Main->selectcol_arrayref($od_sql, {}, $usr);
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm 2008-06-26 13:14:10 UTC (rev 9935)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm 2008-06-26 14:01:03 UTC (rev 9936)
@@ -2470,27 +2470,27 @@
my $sth = metabib::metarecord_source_map->db_Main->prepare(<<" SQL");
SELECT *
FROM search.staged_fts(
- $param_search_ou,
- $param_depth,
- $param_searches,
- $param_statuses,
- $param_locations,
- $param_audience,
- $param_language,
- $param_lit_form,
- $param_types,
- $param_forms,
- $param_vformats,
- $param_bib_level,
- $param_pref_lang,
- $param_pref_lang_multiplier,
- $param_sort,
- $param_sort_desc,
- $metarecord,
- $staff,
- $param_rel_limit,
- $param_chk_limit,
- $param_skip_chk
+ $param_search_ou\:\:INT,
+ $param_depth\:\:INT,
+ $param_searches\:\:TEXT,
+ $param_statuses\:\:INT[],
+ $param_locations\:\:INT[],
+ $param_audience\:\:TEXT[],
+ $param_language\:\:TEXT[],
+ $param_lit_form\:\:TEXT[],
+ $param_types\:\:TEXT[],
+ $param_forms\:\:TEXT[],
+ $param_vformats\:\:TEXT[],
+ $param_bib_level\:\:TEXT[],
+ $param_pref_lang\:\:TEXT,
+ $param_pref_lang_multiplier\:\:REAL,
+ $param_sort\:\:TEXT,
+ $param_sort_desc\:\:BOOL,
+ $metarecord\:\:BOOL,
+ $staff\:\:BOOL,
+ $param_rel_limit\:\:INT,
+ $param_chk_limit\:\:INT,
+ $param_skip_chk\:\:INT
);
SQL
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm 2008-06-26 13:14:10 UTC (rev 9935)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm 2008-06-26 14:01:03 UTC (rev 9936)
@@ -281,7 +281,7 @@
my $self = shift;
my $id = shift;
- $self->_create_node( '/atom:feed', 'http://www.w3.org/2005/Atom', 'id', $id );
+ $self->_create_node( $self->{item_xpath}, 'http://www.w3.org/2005/Atom', 'id', $id );
}
package OpenILS::WWW::SuperCat::Feed::atom::item;
@@ -350,6 +350,13 @@
);
}
+sub id {
+ my $self = shift;
+ my $id = shift;
+
+ $self->_create_node($self->{item_xpath}, undef,'guid', $id);
+}
+
package OpenILS::WWW::SuperCat::Feed::rss2::item;
use base 'OpenILS::WWW::SuperCat::Feed::rss2';
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2008-06-26 13:14:10 UTC (rev 9935)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2008-06-26 14:01:03 UTC (rev 9936)
@@ -741,6 +741,7 @@
$flesh_feed
);
$feed->root($root);
+ $feed->id($bucket_tag);
$feed->title("Items in Book Bag [".$bucket->name."]");
$feed->creator($host);
@@ -1209,7 +1210,7 @@
$node->add_holdings($xml);
}
- $node->id($item_tag) if ($flesh);
+ $node->id($item_tag);
#$node->update_ts(clense_ISO8601($record->edit_date));
$node->link(alternate => $feed->unapi . "?id=$item_tag&format=htmlholdings-full" => 'text/html') if ($flesh);
$node->link(opac => $feed->unapi . "?id=$item_tag&format=opac") if ($flesh);
Modified: branches/acq-experiment/Open-ILS/src/sql/Pg/020.schema.functions.sql
===================================================================
--- branches/acq-experiment/Open-ILS/src/sql/Pg/020.schema.functions.sql 2008-06-26 13:14:10 UTC (rev 9935)
+++ branches/acq-experiment/Open-ILS/src/sql/Pg/020.schema.functions.sql 2008-06-26 14:01:03 UTC (rev 9936)
@@ -112,7 +112,7 @@
CREATE OR REPLACE FUNCTION public.call_number_dewey( TEXT ) RETURNS TEXT AS $$
my $txt = shift;
$txt =~ s/^\s+//o;
- $txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//o;
+ $txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//og;
$txt =~ s/\s+$//o;
if ($txt =~ /(\d{3}(?:\.\d+)?)/o) {
return $1;
@@ -206,10 +206,4 @@
) z;
$$ LANGUAGE SQL STABLE;
-CREATE AGGREGATE array_accum (
- sfunc = array_append,
- basetype = anyelement,
- stype = anyarray,
- initcond = '{}'
-);
More information about the open-ils-commits
mailing list