This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Notes on conversion to bugzilla
>>>>> "Dan" == Daniel Berlin <dberlin@dberlin.org> writes:
Dan> Sorry, this got shoved into my gdb label, which i only read a
Dan> small time.
No problem.
Dan> You will have to update the script to output something that is the
Dan> same as the current schema.
BTW there's a reference for various versions of bugzilla schema here:
http://www.ravenbrook.com/project/p4dti/tool/cgi/bugzilla-schema/
I dumped the schema from the database, though, and updated the script,
using my newly-acquired minimal knowledge of SQL.
There were some field name changes, and I also changed some inserts to
look up IDs in other tables. So, we end up with things like:
insert into bugs(
bug_id, assigned_to, bug_severity, priority, bug_status, creation_ts, delta_ts
,
short_desc,
reporter, version,
product_id, component_id, resolution, target_milestone, qa_contact,
gccbuild, gcctarget, gcchost, keywords
) values (
4, 10, 'critical', 'P2', 'CLOSED', '2000-11-01 18:08:00', '20020430091342',
'Attempt to initialize Variable Array',
17, '5.0',
(select id from products where products.name = 'gdb'), (select id from components where components.name = 'gdb'), 'FIXED', '---', 0,
'', '', '', 0
);
Dan> Once gnatsparse outputs things in the current schema, we just stop the
Dan> sourceware bugzilla for a few minutes, tell gnatsparse to start
Dan> numbering bugs at the last bug in the database (the bug number is
Dan> unique across all products), let it run, and then import that into
Dan> sql.
Sounds good to me. Is there an easy way to test it first?
I can send you the output, the script, the diff between the pristine
script and what I came up with, ... whatever you like.
I wasn't sure what to do about already existing entries in the
'profiles' table. I don't know enough SQL to know whether the inserts
generated by this script will be a problem :-/
Tom> From a glance on sourceware it looks like perhaps just using
Tom> log_accum_bugzillified is enough, but I have not tested this.
Dan> Yes, this would work fine.
Great. I've appended a patch to CVSROOT/loginfo.
I only updated the gdb bits; I will do the rest later after pinging
the various lists.
Tom
*** loginfo 26 Mar 2008 18:16:35 -0600 1.34
--- loginfo 25 Jul 2008 13:14:51 -0600
***************
*** 41,56 ****
^/?src/cgen (/usr/sourceware/bin/log_accum -T cgen -G cgen -C src -m cgen-cvs@sourceware.org -s %{sVv})
^/?src/sid (/usr/sourceware/bin/log_accum -T sid -G sid -C src -m sid-cvs@sourceware.org -s %{sVv})
! ^/?src/gdb (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/mmalloc (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/readline (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/sim (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/utils (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/tcl (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/itcl (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/libgui (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/tix (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/tk (/usr/sourceware/bin/log_accum -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
^/?src/winsup (QMAILHOST=cygwin.com /usr/sourceware/bin/log_accum -T cygwin -G cygwin -C src -m cygwin-cvs@cygwin.com -s %{sVv})
^/?src/cygwin.* (QMAILHOST=cygwin.com /usr/sourceware/bin/log_accum -T cygwin -G cygwin -C src -m cygwin-cvs@cygwin.com -s %{sVv})
--- 41,56 ----
^/?src/cgen (/usr/sourceware/bin/log_accum -T cgen -G cgen -C src -m cgen-cvs@sourceware.org -s %{sVv})
^/?src/sid (/usr/sourceware/bin/log_accum -T sid -G sid -C src -m sid-cvs@sourceware.org -s %{sVv})
! ^/?src/gdb (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/mmalloc (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/readline (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/sim (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/utils (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/tcl (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/itcl (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/libgui (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/tix (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
! ^/?src/tk (/usr/sourceware/bin/log_accum_bugzillified -T gdb -G gdb -C src -m gdb-cvs@sourceware.org -s %{sVv})
^/?src/winsup (QMAILHOST=cygwin.com /usr/sourceware/bin/log_accum -T cygwin -G cygwin -C src -m cygwin-cvs@cygwin.com -s %{sVv})
^/?src/cygwin.* (QMAILHOST=cygwin.com /usr/sourceware/bin/log_accum -T cygwin -G cygwin -C src -m cygwin-cvs@cygwin.com -s %{sVv})