[pacman-dev] do we need requiredby?
Dan McGee
dpmcgee at gmail.com
Thu Nov 15 12:01:31 EST 2007
On Nov 15, 2007 10:42 AM, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
> On Nov 15, 2007 4:39 AM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
> >
> > > On Nov 14, 2007 6:08 PM, Dan McGee <dpmcgee at gmail.com> wrote:
> > > > We (anyone want to volunteer) also need to make a tool to remove
> > > > requiredby entries.
> > >
> > > I was going to python it up... it's an easy file to parse and rewrite,
> > > probably like 20 lines
> > >
> > > > I took an initial stab at it using libalpm, then I
> > > > realized we have no explicit mechanism to tell the backend to write to
> > > > the DB. Does this sound like something we should expose, or is it too
> > > > low level?
> > >
> > > I'd say no. There's a reason why we don't have mutators for package
> > > structures (front ends shouldn't be modifying that data).
> > If you implement this with care (don't let the front-end corrupt the db), this
> > is acceptable for me. Personally, sometimes I modify my localdb by hand (mostly
> > %REASON%), which is much more dangerous than a well controlled
> > localdb->pmpkg_t...edit...pmpkg_t->localdb process.
> > After we removed %REQUIREDBY%, %REASON% is the only reason in my mind where this
> ...snip...
>
> This is totally different from a design perspective. Dan mentioned a
> generic mechanism to write, where as you're suggesting a unique
> operation. A generic, public interface to modify and write to the DB
> is, in my opinion, a bad idea, but operations which do things (and
> write) within libalpm's control is fine
I actually wasn't referring to mutators to make that clear. I was
thinking along the lines of a public alpm_pkg_force_write(pmpkg_t
*pkg) or something. However, that still doesn't seem that clean, but I
don't know.
-Dan
More information about the pacman-dev
mailing list