Bug#323601: HTTP POST submits of patches to the central database

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#323601: HTTP POST submits of patches to the central database

Kari Pahula-2
Hello.

Here's my mostly functional patch to add code to send in patches to
the central debtags database with HTTP POST instead of mailing them.

I took the liberty of refactoring most of update-tags.pl to
UpdateTags.pm.  At the same time I moved config.pl to it's own Cfg.pm.
IMHO it would be a good idea to make proper modules from commonly used
code, even if it was never submitted to CPAN.  I didn't patch the rest
of those "require '../config.pl';" calls to "use
CentralDatabase::Cfg;" yet.  Feel free to put my code to use a require
too if you want.

I failed to get the $entity =
$parser->parse_data($q->param('POSTDATA')); call to parse the query
correctly in patch-submit.cgi.  I'm going to have to ask someone else
to sort that one out.  $entity->dump_skeleton just shows:

Content-type: multipart/mixed
Effective-type: multipart/mixed
Body-file: NONE
Num-parts: 1
--
    Content-type: text/plain
    Effective-type: text/plain
    Body-file: NONE
    --

AFAIK Body-file should contain the debtags diff, not be NONE.

Other than this, I've patched debtags-editor to show in a menu an
option to submit patches via HTTP POST and to show the results in a
Gtk::Dialog.  Unlike email, this way of submitting patches is
synchronous and the program's showing the result of the submission
right away.

The patch to debtags-edit requires patching libapt-front too, whose
patch I sent to its mailing list.  See
http://lists.alioth.debian.org/pipermail/libapt-front-devel/2006-March/000786.html

central-database.tar.gz (5K) Download Attachment
debtags-edit.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#323601: HTTP POST submits of patches to the central database

Erich Schubert
Hello Kari,
Thanks for your patch.

However, the central database needs a complete rewrite and needs to
move to a new host, so I'll probably not add this functionality for
now. The database as it is now dates back to pre-faceted debtags, to
the very first experiments. Thats why it has stuff such as tag
implications which can be used to somewhat emulate facets.

best regards,
Erich Schubert
--
    erich@(mucl.de|debian.org)      --      GPG Key ID: 4B3A135C    (o_
  To understand recursion you first need to understand recursion.   //\
  Wo befreundete Wege zusammenlaufen, da sieht die ganze Welt für   V_/_
        eine Stunde wie eine Heimat aus. --- Herrmann Hesse

Reply | Threaded
Open this post in threaded view
|

Bug#323601: HTTP POST submits of patches to the central database

Erich Schubert
Oh, one more thing:
A central database rewrite should take a couple of things into account
we're going to need now.
For example, moderation/reviews. Right now I think enrico has been
reviewing much of the changes made to the central database when
importing them into his authorative copy.
We need to add infrastructure supporting this, with a few roles:
- we have tags that are to be audited by specific people only, such as
custom-debian-distribution tags, e.g. junior tags.
- we might want to have "adopted tags", where one person offers to
review a certain tag, but doesn't want to participate in the full
review team. For example specific language tags; we might find someone
willing to review haskell tagging, e.g.; however others might still be
allowed to review these tags, too.
- review team, that needs an efficient UI for reviewing added/removed tags
- advanced edit operations for renaming tags, adding tags, splitting
tags, merging tags...

best regards,
Erich Schubert
--
    erich@(mucl.de|debian.org)      --      GPG Key ID: 4B3A135C    (o_
  To understand recursion you first need to understand recursion.   //\
  Wo befreundete Wege zusammenlaufen, da sieht die ganze Welt für   V_/_
        eine Stunde wie eine Heimat aus. --- Herrmann Hesse