FreeBSD Bugzilla – Attachment 193414 Details for
Bug 228023
databases/ruby-bdb: Allow poudriere run with BUILD_AS_NON_ROOT=yes on ZFS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch v2
D15425.diff (text/plain), 18.87 KB, created by
Fukang Chen
on 2018-05-15 06:24:18 UTC
(
hide
)
Description:
patch v2
Filename:
MIME Type:
Creator:
Fukang Chen
Created:
2018-05-15 06:24:18 UTC
Size:
18.87 KB
patch
obsolete
>Index: databases/ruby-bdb/Makefile >=================================================================== >--- databases/ruby-bdb/Makefile >+++ databases/ruby-bdb/Makefile >@@ -3,7 +3,7 @@ > > PORTNAME= bdb > PORTVERSION= 0.6.6 >-PORTREVISION= 5 >+PORTREVISION= 6 > CATEGORIES= databases ruby > MASTER_SITES= ftp://ftp.idaemons.org/pub/distfiles/ruby/ \ > http://idaemons.org/distfiles/ruby/ \ >@@ -18,25 +18,28 @@ > > BROKEN_RUBY25= yes > >+TEST_DEPENDS= rubygem-test-unit>0:devel/rubygem-test-unit >+ > OPTIONS_DEFINE= DOCS EXAMPLES > >+USES= bdb shebangfix tar:bzip2 > USE_RUBY= yes > USE_RUBY_EXTCONF= yes > MAKE_ENV+= RUBY_RDOC=${LOCALBASE}/bin/rdoc > > ALL_TARGET= all rdoc >+TEST_TARGET= test > CONFIGURE_ARGS= --with-db-include=${BDB_INCLUDE_DIR} \ > --with-db-lib=${BDB_LIB_DIR} > INSTALL_TARGET= site-install > > DOCS= Changes README.en bdb.rd docs/*.rd > DOCSDIR= ${RUBY_MODDOCDIR} > EXAMPLESDIR= ${RUBY_MODEXAMPLESDIR} > SHAREMODE= 0644 >-PLIST_FILES= %%RUBY_SITEARCHLIBDIR%%/bdb.so >+PLIST_FILES= ${RUBY_SITEARCHLIBDIR}/bdb.so > PORTDOCS= * > PORTEXAMPLES= * >-USES= bdb shebangfix tar:bzip2 > SHEBANG_FILES= examples/record.rb \ > examples/recno.rb \ > examples/zeroc.rb \ >@@ -56,6 +59,22 @@ > examples/basic.rb \ > examples/lock.rb > >+# COPYTREE_SHARE without the cpio(1) -l option, this >+# allows poudriere running with BUILD_AS_NON_ROOT on ZFS. >+# see PR: 228023 >+COPYTREE_SHARE_RDOC= ${SH} -c '(${FIND} -Ed $$1 $$3 | \ >+ ${CPIO} -dump $$2 >/dev/null 2>&1) && \ >+ ${FIND} -Ed $$1 $$3 \( -type d -exec ${SH} \ >+ -c '\''cd '\''$$2'\'' && ${CHMOD} 755 "$$@"'\'' . {} + \ >+ -o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && \ >+ ${CHMOD} ${_SHAREMODE} "$$@"'\'' . {} + \)' COPYTREE_SHARE_RDOC >+ >+.include <bsd.port.pre.mk> >+ >+.if ${ARCH} == amd64 || ${ARCH} == i386 >+LIB_DEPENDS+= libunwind.so:devel/libunwind >+.endif >+ > post-patch: > @${RM} ${WRKSRC}/docs/*.orig > >@@ -65,15 +84,10 @@ > post-install-DOCS-on: > ${MKDIR} ${STAGEDIR}${DOCSDIR}/doc > (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}) >- (cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/doc) >+ (cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE_RDOC} . ${STAGEDIR}${DOCSDIR}/doc) > > post-install-EXAMPLES-on: > ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/ > (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} "! -empty") > >-regression-test: build >- @${MKDIR} ${BUILD_WRKSRC}/tmp >- (cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \ >- ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test) >- >-.include <bsd.port.mk> >+.include <bsd.port.post.mk> >Index: databases/ruby-bdb/files/patch-extconf.rb >=================================================================== >--- databases/ruby-bdb/files/patch-extconf.rb >+++ databases/ruby-bdb/files/patch-extconf.rb >@@ -1,24 +1,29 @@ > --- extconf.rb.orig 2011-04-06 19:35:39 UTC > +++ extconf.rb >-@@ -50,7 +50,7 @@ >+@@ -50,7 +50,7 @@ SUBDIRS = #{subdirs.join(' ')} > rdoc: docs/doc/index.html > > docs/doc/index.html: $(RDOC) > -\t@-(cd docs; rdoc .) > +\t@-(cd docs; ${RUBY_RDOC} .) > > ri: > \t@-(rdoc -r docs/*rb) >-@@ -67,7 +67,7 @@ >+@@ -63,11 +63,12 @@ rd2: html >+ html: $(HTML) >+ >+ test: $(DLLIB) >++\t@mkdir tmp >+ EOF > Dir.foreach('tests') do |x| > next if /^\./ =~ x || /(_\.rb|~)$/ =~ x > next if FileTest.directory?(x) > - make.print "\t-#{CONFIG['RUBY_INSTALL_NAME']} tests/#{x}\n" > + make.print "\t-#{RbConfig::CONFIG['ruby_install_name']} tests/#{x}\n" > end > ensure > make.close >-@@ -76,7 +76,7 @@ >+@@ -76,7 +77,7 @@ end > subdirs.each do |subdir| > STDERR.puts("#{$0}: Entering directory `#{subdir}'") > Dir.chdir(subdir) >Index: databases/ruby-bdb/files/patch-src-common.c >=================================================================== >--- databases/ruby-bdb/files/patch-src-common.c >+++ databases/ruby-bdb/files/patch-src-common.c >@@ -1,137 +0,0 @@ >---- src/common.c.orig 2011-04-06 19:35:39.000000000 +0000 >-+++ src/common.c 2015-01-22 17:10:32.000000000 +0000 >-@@ -1229,7 +1229,7 @@ >- if (argc && TYPE(argv[argc - 1]) == T_HASH) { >- VALUE v, f = argv[argc - 1]; >- >-- if ((v = rb_hash_aref(f, rb_str_new2("txn"))) != RHASH(f)->ifnone) { >-+ if ((v = rb_hash_aref(f, rb_str_new2("txn"))) != rb_hash_ifnone(f)) { >- if (!rb_obj_is_kind_of(v, bdb_cTxn)) { >- rb_raise(bdb_eFatal, "argument of txn must be a transaction"); >- } >-@@ -1241,7 +1241,7 @@ >- dbst->options |= envst->options & BDB_NO_THREAD; >- dbst->marshal = txnst->marshal; >- } >-- else if ((v = rb_hash_aref(f, rb_str_new2("env"))) != RHASH(f)->ifnone) { >-+ else if ((v = rb_hash_aref(f, rb_str_new2("env"))) != rb_hash_ifnone(f)) { >- if (!rb_obj_is_kind_of(v, bdb_cEnv)) { >- rb_raise(bdb_eFatal, "argument of env must be an environnement"); >- } >-@@ -1254,11 +1254,11 @@ >- #if HAVE_CONST_DB_ENCRYPT >- if (envst && (envst->options & BDB_ENV_ENCRYPT)) { >- VALUE tmp = rb_str_new2("set_flags"); >-- if ((v = rb_hash_aref(f, rb_intern("set_flags"))) != RHASH(f)->ifnone) { >-+ if ((v = rb_hash_aref(f, rb_intern("set_flags"))) != rb_hash_ifnone(f)) { >- rb_hash_aset(f, rb_intern("set_flags"), >- INT2NUM(NUM2INT(v) | DB_ENCRYPT)); >- } >-- else if ((v = rb_hash_aref(f, tmp)) != RHASH(f)->ifnone) { >-+ else if ((v = rb_hash_aref(f, tmp)) != rb_hash_ifnone(f)) { >- rb_hash_aset(f, tmp, INT2NUM(NUM2INT(v) | DB_ENCRYPT)); >- } >- else { >-@@ -1570,10 +1570,10 @@ >- #endif >- switch(dbst->type) { >- case DB_BTREE: >-- RBASIC(obj)->klass = bdb_cBtree; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cBtree); >- break; >- case DB_HASH: >-- RBASIC(obj)->klass = bdb_cHash; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cHash); >- break; >- case DB_RECNO: >- { >-@@ -1581,17 +1581,17 @@ >- >- rb_warning("It's hard to distinguish Recnum with Recno for all versions of Berkeley DB"); >- if ((count = bdb_is_recnum(dbst->dbp)) != -1) { >-- RBASIC(obj)->klass = bdb_cRecnum; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cRecnum); >- dbst->len = count; >- } >- else { >-- RBASIC(obj)->klass = bdb_cRecno; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cRecno); >- } >- break; >- } >- #if HAVE_CONST_DB_QUEUE >- case DB_QUEUE: >-- RBASIC(obj)->klass = bdb_cQueue; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cQueue); >- break; >- #endif >- default: >-@@ -1635,29 +1635,29 @@ >- dbst->options = BDB_NOT_OPEN; >- cl = obj; >- while (cl) { >-- if (cl == bdb_cBtree || RCLASS(cl)->m_tbl == RCLASS(bdb_cBtree)->m_tbl) { >-+ if (cl == bdb_cBtree || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cBtree)) { >- dbst->type = DB_BTREE; >- break; >- } >-- if (cl == bdb_cRecnum || RCLASS(cl)->m_tbl == RCLASS(bdb_cRecnum)->m_tbl) { >-+ if (cl == bdb_cRecnum || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cRecnum)) { >- dbst->type = DB_RECNO; >- break; >- } >-- else if (cl == bdb_cHash || RCLASS(cl)->m_tbl == RCLASS(bdb_cHash)->m_tbl) { >-+ else if (cl == bdb_cHash || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cHash)) { >- dbst->type = DB_HASH; >- break; >- } >-- else if (cl == bdb_cRecno || RCLASS(cl)->m_tbl == RCLASS(bdb_cRecno)->m_tbl) { >-+ else if (cl == bdb_cRecno || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cRecno)) { >- dbst->type = DB_RECNO; >- break; >- } >- #if HAVE_CONST_DB_QUEUE >-- else if (cl == bdb_cQueue || RCLASS(cl)->m_tbl == RCLASS(bdb_cQueue)->m_tbl) { >-+ else if (cl == bdb_cQueue || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cQueue)) { >- dbst->type = DB_QUEUE; >- break; >- } >- #endif >-- else if (cl == bdb_cUnknown || RCLASS(cl)->m_tbl == RCLASS(bdb_cUnknown)->m_tbl) { >-+ else if (cl == bdb_cUnknown || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cUnknown)) { >- dbst->type = DB_UNKNOWN; >- break; >- } >-@@ -3004,8 +3004,8 @@ >- >- if (argc && TYPE(argv[argc - 1]) == T_HASH) { >- VALUE g, f = argv[argc - 1]; >-- if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || >-- (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { >-+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || >-+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { >- flags = NUM2INT(g); >- } >- argc--; >-@@ -3323,8 +3323,8 @@ >- flags = 0; >- if (argc && TYPE(argv[argc - 1]) == T_HASH) { >- VALUE g, f = argv[argc - 1]; >-- if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || >-- (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { >-+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || >-+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { >- flags = NUM2INT(g); >- } >- argc--; >-@@ -3348,8 +3348,8 @@ >- flags = 0; >- if (TYPE(argv[argc - 1]) == T_HASH) { >- VALUE f = argv[argc - 1]; >-- if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || >-- (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { >-+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || >-+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { >- flags = NUM2INT(g); >- } >- argc--; >Index: databases/ruby-bdb/files/patch-src-cursor.c >=================================================================== >--- databases/ruby-bdb/files/patch-src-cursor.c >+++ databases/ruby-bdb/files/patch-src-cursor.c >@@ -1,13 +0,0 @@ >---- src/cursor.c.orig 2015-01-22 17:37:51.000000000 +0000 >-+++ src/cursor.c 2015-01-22 17:38:17.000000000 +0000 >-@@ -29,8 +29,8 @@ >- flags = 0; >- if (argc && TYPE(argv[argc - 1]) == T_HASH) { >- VALUE g, f = argv[argc - 1]; >-- if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || >-- (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { >-+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || >-+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { >- flags = NUM2INT(g); >- } >- argc--; >Index: databases/ruby-bdb/files/patch-src-recnum.c >=================================================================== >--- databases/ruby-bdb/files/patch-src-recnum.c >+++ databases/ruby-bdb/files/patch-src-recnum.c >@@ -1,22 +0,0 @@ >---- src/recnum.c.orig 2011-04-06 19:35:39.000000000 +0000 >-+++ src/recnum.c 2015-01-22 17:16:32.000000000 +0000 >-@@ -17,7 +17,7 @@ >- argc++; >- } >- rb_hash_aset(argv[argc - 1], array, INT2FIX(0)); >-- if (rb_hash_aref(argv[argc - 1], sarray) != RHASH(argv[argc - 1])->ifnone) { >-+ if (rb_hash_aref(argv[argc - 1], sarray) != rb_hash_ifnone(argv[argc - 1])) { >- rb_hash_aset(argv[argc - 1], sarray, INT2FIX(0)); >- } >- rb_hash_aset(argv[argc - 1], rb_str_new2("set_flags"), INT2FIX(DB_RENUMBER)); >-@@ -697,8 +697,8 @@ >- >- if (argc && TYPE(argv[argc - 1]) == T_HASH) { >- VALUE f = argv[argc - 1]; >-- if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone || >-- (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) { >-+ if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) || >-+ (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) { >- flags = NUM2INT(g); >- } >- argc--; >Index: databases/ruby-bdb/files/patch-src_common.c >=================================================================== >--- databases/ruby-bdb/files/patch-src_common.c >+++ databases/ruby-bdb/files/patch-src_common.c >@@ -1,24 +1,27 @@ >---- src/common.c.orig 2011-04-06 19:35:39.000000000 +0000 >-+++ src/common.c 2015-01-22 17:10:32.000000000 +0000 >-@@ -1229,7 +1229,7 @@ >+Upstream pull request link: >+https://github.com/knu/ruby-bdb/pull/6 >+ >+--- src/common.c.orig 2011-04-06 19:35:39 UTC >++++ src/common.c >+@@ -1229,7 +1229,7 @@ bdb_s_new(int argc, VALUE *argv, VALUE obj) > if (argc && TYPE(argv[argc - 1]) == T_HASH) { > VALUE v, f = argv[argc - 1]; > > - if ((v = rb_hash_aref(f, rb_str_new2("txn"))) != RHASH(f)->ifnone) { > + if ((v = rb_hash_aref(f, rb_str_new2("txn"))) != rb_hash_ifnone(f)) { > if (!rb_obj_is_kind_of(v, bdb_cTxn)) { > rb_raise(bdb_eFatal, "argument of txn must be a transaction"); > } >-@@ -1241,7 +1241,7 @@ >+@@ -1241,7 +1241,7 @@ bdb_s_new(int argc, VALUE *argv, VALUE obj) > dbst->options |= envst->options & BDB_NO_THREAD; > dbst->marshal = txnst->marshal; > } > - else if ((v = rb_hash_aref(f, rb_str_new2("env"))) != RHASH(f)->ifnone) { > + else if ((v = rb_hash_aref(f, rb_str_new2("env"))) != rb_hash_ifnone(f)) { > if (!rb_obj_is_kind_of(v, bdb_cEnv)) { > rb_raise(bdb_eFatal, "argument of env must be an environnement"); > } >-@@ -1254,11 +1254,11 @@ >+@@ -1254,11 +1254,11 @@ bdb_s_new(int argc, VALUE *argv, VALUE obj) > #if HAVE_CONST_DB_ENCRYPT > if (envst && (envst->options & BDB_ENV_ENCRYPT)) { > VALUE tmp = rb_str_new2("set_flags"); >@@ -32,77 +35,98 @@ > rb_hash_aset(f, tmp, INT2NUM(NUM2INT(v) | DB_ENCRYPT)); > } > else { >-@@ -1570,10 +1570,10 @@ >+@@ -1277,16 +1277,16 @@ bdb_s_new(int argc, VALUE *argv, VALUE obj) >+ dbst->marshal = obj; >+ dbst->options |= BDB_MARSHAL; >+ } >+- if (rb_method_boundp(obj, rb_intern("bdb_store_key"), 0) == Qtrue) { >++ if (rb_method_boundp(obj, rb_intern("bdb_store_key"), 0) == 1) { >+ dbst->filter[FILTER_KEY] = INT2FIX(rb_intern("bdb_store_key")); >+ } >+- if (rb_method_boundp(obj, rb_intern("bdb_fetch_key"), 0) == Qtrue) { >++ if (rb_method_boundp(obj, rb_intern("bdb_fetch_key"), 0) == 1) { >+ dbst->filter[2 + FILTER_KEY] = INT2FIX(rb_intern("bdb_fetch_key")); >+ } >+- if (rb_method_boundp(obj, rb_intern("bdb_store_value"), 0) == Qtrue) { >++ if (rb_method_boundp(obj, rb_intern("bdb_store_value"), 0) == 1) { >+ dbst->filter[FILTER_VALUE] = INT2FIX(rb_intern("bdb_store_value")); >+ } >+- if (rb_method_boundp(obj, rb_intern("bdb_fetch_value"), 0) == Qtrue) { >++ if (rb_method_boundp(obj, rb_intern("bdb_fetch_value"), 0) == 1) { >+ dbst->filter[2 + FILTER_VALUE] = INT2FIX(rb_intern("bdb_fetch_value")); >+ } >+ rb_obj_call_init(res, argc, argv); >+@@ -1570,10 +1570,10 @@ bdb_init(int argc, VALUE *argv, VALUE obj) > #endif > switch(dbst->type) { > case DB_BTREE: > - RBASIC(obj)->klass = bdb_cBtree; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cBtree); >++ rb_obj_reveal(obj, bdb_cBtree); > break; > case DB_HASH: > - RBASIC(obj)->klass = bdb_cHash; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cHash); >++ rb_obj_reveal(obj, bdb_cHash); > break; > case DB_RECNO: > { >-@@ -1581,17 +1581,17 @@ >+@@ -1581,17 +1581,17 @@ bdb_init(int argc, VALUE *argv, VALUE obj) > > rb_warning("It's hard to distinguish Recnum with Recno for all versions of Berkeley DB"); > if ((count = bdb_is_recnum(dbst->dbp)) != -1) { > - RBASIC(obj)->klass = bdb_cRecnum; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cRecnum); >++ rb_obj_reveal(obj, bdb_cRecnum); > dbst->len = count; > } > else { > - RBASIC(obj)->klass = bdb_cRecno; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cRecno); >++ rb_obj_reveal(obj, bdb_cRecno); > } > break; > } > #if HAVE_CONST_DB_QUEUE > case DB_QUEUE: > - RBASIC(obj)->klass = bdb_cQueue; >-+ RBASIC_SET_CLASS_RAW(obj, bdb_cQueue); >++ rb_obj_reveal(obj, bdb_cQueue); > break; > #endif > default: >-@@ -1635,29 +1635,29 @@ >+@@ -1635,29 +1635,29 @@ bdb_s_alloc(obj) > dbst->options = BDB_NOT_OPEN; > cl = obj; > while (cl) { > - if (cl == bdb_cBtree || RCLASS(cl)->m_tbl == RCLASS(bdb_cBtree)->m_tbl) { >-+ if (cl == bdb_cBtree || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cBtree)) { >++ if (cl == bdb_cBtree || RTEST(rb_funcall(cl, rb_intern("<="), 1, bdb_cBtree))) { > dbst->type = DB_BTREE; > break; > } > - if (cl == bdb_cRecnum || RCLASS(cl)->m_tbl == RCLASS(bdb_cRecnum)->m_tbl) { >-+ if (cl == bdb_cRecnum || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cRecnum)) { >++ if (cl == bdb_cRecnum || RTEST(rb_funcall(cl, rb_intern("<="), 1, bdb_cRecnum))) { > dbst->type = DB_RECNO; > break; > } > - else if (cl == bdb_cHash || RCLASS(cl)->m_tbl == RCLASS(bdb_cHash)->m_tbl) { >-+ else if (cl == bdb_cHash || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cHash)) { >++ else if (cl == bdb_cHash || RTEST(rb_funcall(cl, rb_intern("<="), 1, bdb_cHash))) { > dbst->type = DB_HASH; > break; > } > - else if (cl == bdb_cRecno || RCLASS(cl)->m_tbl == RCLASS(bdb_cRecno)->m_tbl) { >-+ else if (cl == bdb_cRecno || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cRecno)) { >++ else if (cl == bdb_cRecno || RTEST(rb_funcall(cl, rb_intern("<="), 1, bdb_cRecno))) { > dbst->type = DB_RECNO; > break; > } > #if HAVE_CONST_DB_QUEUE > - else if (cl == bdb_cQueue || RCLASS(cl)->m_tbl == RCLASS(bdb_cQueue)->m_tbl) { >-+ else if (cl == bdb_cQueue || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cQueue)) { >++ else if (cl == bdb_cQueue || RTEST(rb_funcall(cl, rb_intern("<="), 1, bdb_cQueue))) { > dbst->type = DB_QUEUE; > break; > } > #endif > - else if (cl == bdb_cUnknown || RCLASS(cl)->m_tbl == RCLASS(bdb_cUnknown)->m_tbl) { >-+ else if (cl == bdb_cUnknown || RCLASS_M_TBL(cl) == RCLASS_M_TBL(bdb_cUnknown)) { >++ else if (cl == bdb_cUnknown || RTEST(rb_funcall(cl, rb_intern("<="), 1, bdb_cUnknown))) { > dbst->type = DB_UNKNOWN; > break; > } >-@@ -3004,8 +3004,8 @@ >+@@ -3004,8 +3004,8 @@ bdb_each_kvc(argc, argv, obj, sens, replace, type) > > if (argc && TYPE(argv[argc - 1]) == T_HASH) { > VALUE g, f = argv[argc - 1]; >@@ -113,7 +137,7 @@ > flags = NUM2INT(g); > } > argc--; >-@@ -3323,8 +3323,8 @@ >+@@ -3323,8 +3323,8 @@ bdb_clear(int argc, VALUE *argv, VALUE obj) > flags = 0; > if (argc && TYPE(argv[argc - 1]) == T_HASH) { > VALUE g, f = argv[argc - 1]; >@@ -124,7 +148,7 @@ > flags = NUM2INT(g); > } > argc--; >-@@ -3348,8 +3348,8 @@ >+@@ -3348,8 +3348,8 @@ bdb_replace(int argc, VALUE *argv, VALUE obj) > flags = 0; > if (TYPE(argv[argc - 1]) == T_HASH) { > VALUE f = argv[argc - 1]; >Index: databases/ruby-bdb/files/patch-src_cursor.c >=================================================================== >--- databases/ruby-bdb/files/patch-src_cursor.c >+++ databases/ruby-bdb/files/patch-src_cursor.c >@@ -1,6 +1,6 @@ >---- src/cursor.c.orig 2015-01-22 17:37:51.000000000 +0000 >-+++ src/cursor.c 2015-01-22 17:38:17.000000000 +0000 >-@@ -29,8 +29,8 @@ >+--- src/cursor.c.orig 2011-04-06 19:35:39 UTC >++++ src/cursor.c >+@@ -29,8 +29,8 @@ bdb_cursor(int argc, VALUE *argv, VALUE obj) > flags = 0; > if (argc && TYPE(argv[argc - 1]) == T_HASH) { > VALUE g, f = argv[argc - 1]; >Index: databases/ruby-bdb/files/patch-src_recnum.c >=================================================================== >--- databases/ruby-bdb/files/patch-src_recnum.c >+++ databases/ruby-bdb/files/patch-src_recnum.c >@@ -1,15 +1,15 @@ >---- src/recnum.c.orig 2011-04-06 19:35:39.000000000 +0000 >-+++ src/recnum.c 2015-01-22 17:16:32.000000000 +0000 >-@@ -17,7 +17,7 @@ >+--- src/recnum.c.orig 2011-04-06 19:35:39 UTC >++++ src/recnum.c >+@@ -17,7 +17,7 @@ bdb_recnum_init(int argc, VALUE *argv, VALUE obj) > argc++; > } > rb_hash_aset(argv[argc - 1], array, INT2FIX(0)); > - if (rb_hash_aref(argv[argc - 1], sarray) != RHASH(argv[argc - 1])->ifnone) { > + if (rb_hash_aref(argv[argc - 1], sarray) != rb_hash_ifnone(argv[argc - 1])) { > rb_hash_aset(argv[argc - 1], sarray, INT2FIX(0)); > } > rb_hash_aset(argv[argc - 1], rb_str_new2("set_flags"), INT2FIX(DB_RENUMBER)); >-@@ -697,8 +697,8 @@ >+@@ -697,8 +697,8 @@ bdb_sary_clear(int argc, VALUE *argv, VALUE obj) > > if (argc && TYPE(argv[argc - 1]) == T_HASH) { > VALUE f = argv[argc - 1];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 228023
:
193087
|
193088
|
193388
|
193389
| 193414 |
193425
|
193426
|
193427