Re: Python and gramps...

2007-02-26 Thread Scot Hetzel

On 2/25/07, Chuck Swiger [EMAIL PROTECTED] wrote:

Anders Troback wrote:
 On Fri, 23 Feb 2007 14:58:21 -0800
 Chuck Swiger [EMAIL PROTECTED] wrote:
[ ... ]
 I think you need to choose a particular flavor of BDB which is
 recent enough to support these log capabilities; try setting
 something like these in /etc/make.conf:

 WITH_BERKELEYDB=db42
 WITH_BDB_VER=42

 ...or choose some other recent 4.x version, and then try
 reinstalling /usr/ports/databases/py-bsddb.

 Yes, thanks that did it!

Ah, very good.  You're welcome.

 How do I reflect this in my port?

Many ports do something like check whether WITH_BDB_VER is defined to
something in order to register a properly dependency.  If you can figure out
which versions of BDB are supported with your software, then you error with a
warning if too old a version is chosen, or you can do something like choose a
reasonable default value if none is already set


All you need to do is add the following to the port:

USE_BDB= 42+
INVALID_BDB_VER= 2 3 40 41

And it will give an error if WITH_BDB_VER is set to a value lower than 42.

Scot
--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Python and gramps...

2007-02-25 Thread Anders Troback
On Sun, 25 Feb 2007 08:30:17 -0500
Chuck Swiger [EMAIL PROTECTED] wrote:

 Anders Troback wrote:
  On Fri, 23 Feb 2007 14:58:21 -0800
  Chuck Swiger [EMAIL PROTECTED] wrote:
 [ ... ]
  I think you need to choose a particular flavor of BDB which is
  recent enough to support these log capabilities; try setting
  something like these in /etc/make.conf:
 
  WITH_BERKELEYDB=db42
  WITH_BDB_VER=42
 
  ...or choose some other recent 4.x version, and then try  
  reinstalling /usr/ports/databases/py-bsddb.
  
  Yes, thanks that did it!
 
 Ah, very good.  You're welcome.
 
  How do I reflect this in my port?
 
 Many ports do something like check whether WITH_BDB_VER is defined to 
 something in order to register a properly dependency.  If you can
 figure out which versions of BDB are supported with your software,
 then you error with a warning if too old a version is chosen, or you
 can do something like choose a reasonable default value if none is
 already set
 

I can check the version like this (I think):

.if !defined(WITH_BDB_VER) 
WITH_BDB_VER= 42
.endif
.if (${WITH_BDB_VER}  42)
BROKEN=   Does not run with less than db42
.endif

But how do I know if the dependency ports are compiled with the right
version? Is this the right way of doing this or is there a better way?

-- 


How many Microsoft employees does it take to screw in a light bulb?
None, they declare darkness a new standard.

Anders Trobäck
http://www.troback.com/
-
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Python and gramps...

2007-02-25 Thread Chuck Swiger

Anders Troback wrote:
[ ... ]

I can check the version like this (I think):

.if !defined(WITH_BDB_VER) 
WITH_BDB_VER= 42

.endif
.if (${WITH_BDB_VER}  42)
BROKEN=   Does not run with less than db42
.endif

But how do I know if the dependency ports are compiled with the right
version? Is this the right way of doing this or is there a better way?


Take a look at the Makefiles for textproc/redland or mail/exim for a simple or 
more complex pair of examples.  For all of them, consider:


  find /usr/ports -name Makefile -print0 | xargs -0 grep -l WITH_BDB_VER

You might find looking at /usr/ports/Mk/bsd.database.mk to answer a lot of 
questions one might have, too.


--
-Chuck

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Python and gramps...

2007-02-23 Thread Chuck Swiger

On Feb 23, 2007, at 2:21 PM, Anders Troback wrote:

The port builds fine but when I'm start up the program and tries to do
things in the program I've got errors. The following error occurs when
I'm trying to create a new file:

8---
13416: ERROR: DbLoader.py: line 468: Failed to open database.
Traceback (most recent call last):
  File /usr/local/share/gramps/DbLoader.py, line 447, in read_file
self.dbstate.db.load(filename,self.uistate.pulse_progressbar,mode)
  File /usr/local/share/gramps/GrampsDb/_GrampsBSDDB.py, line  
347, in
load self.env.set_flags(db.DB_LOG_AUTOREMOVE,1)  # clean up unused  
logs

AttributeError: 'module' object has no attribute 'DB_LOG_AUTOREMOVE'
8---

Similar error pops up almost every were! One person in the gramps ML
are hinting to a problem with the installation of BSDDB. I don't know
mush about Python so I'm kind of lost here!


I think you need to choose a particular flavor of BDB which is recent  
enough to support these log capabilities; try setting something like  
these in /etc/make.conf:


WITH_BERKELEYDB=db42
WITH_BDB_VER=42

...or choose some other recent 4.x version, and then try  
reinstalling /usr/ports/databases/py-bsddb.


--
-Chuck

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Python and gramps...

2007-02-23 Thread Anders Troback
On Fri, 23 Feb 2007 14:58:21 -0800
Chuck Swiger [EMAIL PROTECTED] wrote:

 On Feb 23, 2007, at 2:21 PM, Anders Troback wrote:
  The port builds fine but when I'm start up the program and tries to
  do things in the program I've got errors. The following error
  occurs when I'm trying to create a new file:
 
  8---
  13416: ERROR: DbLoader.py: line 468: Failed to open database.
  Traceback (most recent call last):
File /usr/local/share/gramps/DbLoader.py, line 447, in read_file
  self.dbstate.db.load(filename,self.uistate.pulse_progressbar,mode)
File /usr/local/share/gramps/GrampsDb/_GrampsBSDDB.py, line  
  347, in
  load self.env.set_flags(db.DB_LOG_AUTOREMOVE,1)  # clean up unused  
  logs
  AttributeError: 'module' object has no attribute 'DB_LOG_AUTOREMOVE'
  8---
 
  Similar error pops up almost every were! One person in the gramps ML
  are hinting to a problem with the installation of BSDDB. I don't
  know mush about Python so I'm kind of lost here!
 
 I think you need to choose a particular flavor of BDB which is
 recent enough to support these log capabilities; try setting
 something like these in /etc/make.conf:
 
 WITH_BERKELEYDB=db42
 WITH_BDB_VER=42
 
 ...or choose some other recent 4.x version, and then try  
 reinstalling /usr/ports/databases/py-bsddb.
 

Yes, thanks that did it!

How do I reflect this in my port?


\\troback

-- 


How many Microsoft employees does it take to screw in a light bulb?
None, they declare darkness a new standard.

Anders Trobäck
http://www.troback.com/
-
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]