Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Aug 2013 10:35:38 +0000
From:      Matthew Windsor <mbw500@york.ac.uk>
To:        soc-status@freebsd.org
Cc:        Justin Edward Muniz <jmuniz@freebsd.org>, Eitan Adler <eadler@freebsd.org>
Subject:   GSoC Status: Week 9
Message-ID:  <CAFxS2Cga7g_k=-YbeP=RWCGMEkkcHsR9LBYZox%2BntE2QYZx3Ug@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

Not a terribly successful week, I'm afraid, partially down to a family
medical emergency causing me to need to do hospital visits for two
evenings out of seven, and also down to underestimating the amount of
work needed for GetDepends and GetRequires.  Amongst other things.

Those two actions have had most of their boilerplate written, but I've
realised that the current query code is a bad fit for what I need to
do.  GetDepends/GetRequires return a pkg_deps iterator (I assumed it'd
be pkg), which I imagine is due to dependencies potentially not being
in the database (but still being dependencies).

In order to emit these, I'll need to find out whether or not they
correspond to real packages, which involves running them through a
query.  But a full query with the current query code is a poor fit -
I'll need to write an emitter function and other overbearing
boilerplate, and find some way of stopping the query from throwing
backend errors if it can't find anything (I haven't checked but I
imagine unavailable dependencies should be emitted too).  As well as
this, the new query would then have to open the database again when it
could use the same database opened by the parent query (though whether
I want to keep databases open or close them as soon as they're out of
use is something I haven't asked yet...!)

The latter involves adding more code to the query code, so at this
point I've decided that it's time to rewrite it to be more modular and
approachable for situations that aren't actions (the current code
makes it very easy to write a new query-based action, and very painful
to do a query in the middle of an existing one).  This will probably
be quite painful as a large amount of actions use these, but hopefully
I can keep the existing callback-based interface.

As well as these actions, I haven't been able to make much progress on
the job error reporting front.  I added some code to some of the
unhandled events to make them throw errors, but the error I appeared
to be getting during update wasn't one of them (that, or the events
callback isn't firing properly).  I've accidentally system upgraded
and thus removed my test case for this, so I might have to wait until
testing to get back to this, but it's hard to test a "fatal error"
when I don't even know which error it is!  (Since pkg worked, it might
have been an out of date repository catalogue.  The backend currently
doesn't sync the catalogue unless explicitly asked to.)

So this coming week will probably be spent carrying out the large
query code refactor, finishing GetDepends and GetRequires (which
should share a lot of code), and hopefully starting on making a proper
test jail (for which I'll have to learn how to make pkgng
packages/repositories and jails).  And hopefully I'll be able to
commit more time than I did this week.

~Matt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFxS2Cga7g_k=-YbeP=RWCGMEkkcHsR9LBYZox%2BntE2QYZx3Ug>