diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index d50e9f59d..385fa9436 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-05-18 Alex Roitman + * INSTALL: Clarify; list build-dependencies. + * src/GrampsDb/_ReadGrdb.py: Update progress. + 2006-05-18 Don Allingham * src/GrampsDb/_ReadGedcom.py: fix parsing level so that CHAR is not skipped diff --git a/gramps2/INSTALL b/gramps2/INSTALL index b0331fbd6..ae65885b2 100644 --- a/gramps2/INSTALL +++ b/gramps2/INSTALL @@ -12,6 +12,15 @@ run "./configure && make". However, if you're building from the SVN, the configure is not present. You should auto-generate it by running ./autogen.sh and then "make" and, finally, "make install". +Running ./autogen.sh on this branch of gramps requires the following +packages to be installed: + * automake-1.9 + * gnome-common + * intltool + * libglib2.0-dev (may be called differently on other distros) and +maybe something else. If autogen.sh fails, it should inform you what's +missing. + Regular vs local installation ----------------------------- @@ -35,6 +44,38 @@ YOU MUST INSTALL GCONF SCHEMAS AND MIME TYPES. YOU HAVE BEEN WARNED! +Installing under non-default prefix +----------------------------------- +As hinted above, the gconf schemas and mime types for gramps +MUST be properly installed. The "proper install" means installing +them where gconfd and shared mime system, respectively, will +find them. + +By default, gconfd will look in these places: + 1. Whatever is returned by running: + $ gconftool-2 --get-default-source + 2. The xml::$HOME/.gconf : this is a per-user setup, not system-wide + or xml:merged:$HOME/.gconf : this is a per-user setup, not system-wide +There is a number of ways to let gconfd know where else +to look, but this is outside the scope of installing gramps. + +By default, the shared mime systems will look in these places: + 1. /usr/share/mime + 2. /usr/local/share/mime : this may be broken on some systems + 3. $HOME/.local/share/mime : this is a per-user setup, not system-wide +Likewise, there's a number of ways to instruct the shared mime system +to look in other places, but this is the whole other story. + +So if you install some place other than /usr/share, you will most +likely need to add this option to autogen.sh/configure scripts: + --with-mime-dir=/usr/share/mime + +Using the --prefix=/usr/share and installing as a root will most +likely do everything correctly, so no extra care needs to be +taken. You should take extra care only if you are installing under +something like --prefix=/usr/local/my_gramps, /var/gramps123/blah, etc. + + Packager's issues ------------------ The above mentioned gconf schemas and mime types must be installed. @@ -52,5 +93,5 @@ This argument should disable postinstall calls made during make install, and print a nasty warning during configure. IT IS PACKAGER'S RESPONSIBILITY to follow the advice given by the configure output and to copy the appropriate code -from the src/data/Makefile.am into the pos-tinstall (and post-uninstall) +from the src/data/Makefile.am into the post-install (and post-uninstall) of the particular packaging system. diff --git a/gramps2/src/GrampsDb/_ReadGrdb.py b/gramps2/src/GrampsDb/_ReadGrdb.py index 5d3074fce..869552652 100644 --- a/gramps2/src/GrampsDb/_ReadGrdb.py +++ b/gramps2/src/GrampsDb/_ReadGrdb.py @@ -39,7 +39,8 @@ import sets #------------------------------------------------------------------------- from _GrampsBSDDB import GrampsBSDDB from QuestionDialog import ErrorDialog -import Errors +from Errors import HandleError +from BasicUtils import UpdateCallback #------------------------------------------------------------------------- # @@ -138,6 +139,10 @@ def importData(database, filename, callback=None,cl=0,use_trans=True): }, } + uc = UpdateCallback(callback) + uc.set_total(len(tables.keys())) + + the_len = 0 # Check for duplicate handles. for key in tables: @@ -145,7 +150,8 @@ def importData(database, filename, callback=None,cl=0,use_trans=True): table = table_dict['table'] other_table = table_dict['other_table'] msg = '%s handles in two databases overlap.' % key - check_common_handles(table,other_table,msg) + the_len += check_common_handles(table,other_table,msg) + uc.update() # Proceed with preparing for import if use_trans: @@ -158,6 +164,8 @@ def importData(database, filename, callback=None,cl=0,use_trans=True): # copy all data from new_database to database, # rename gramps IDs of first-class objects when conflicts are found + uc.set_total(the_len) + for key in tables: table_dict = tables[key] id_table = table_dict['id_table'] @@ -166,7 +174,7 @@ def importData(database, filename, callback=None,cl=0,use_trans=True): other_table = table_dict['other_table'] other_get_from_handle = table_dict['other_get_from_handle'] import_table(id_table,add_obj,find_next_gramps_id, - other_table,other_get_from_handle,trans) + other_table,other_get_from_handle,trans,uc) # close the other database and clean things up other_database.close() @@ -182,10 +190,11 @@ def check_common_handles(table,other_table,msg): handles = sets.Set(table.keys()) other_handles = sets.Set(other_table.keys()) if handles.intersection(other_handles): - raise Errors.HandleError(msg) + raise HandleError(msg) + return len(other_handles) def import_table(id_table,add_obj,find_next_gramps_id, - other_table,other_get_from_handle,trans): + other_table,other_get_from_handle,trans,uc): for handle in other_table.keys(): obj = other_get_from_handle(handle) @@ -196,3 +205,4 @@ def import_table(id_table,add_obj,find_next_gramps_id, gramps_id = find_next_gramps_id() obj.gramps_id = gramps_id add_obj(obj,trans) + uc.update()