[csw-maintainers] addition to CSWcommon?

Maciej (Matchek) Blizinski maciej at opencsw.org
Sat Jan 1 10:45:50 CET 2011


No dia 1 de Janeiro de 2011 01:12, Ben Walton <bwalton at opencsw.org> escreveu:
> Excerpts from Maciej (Matchek) Blizinski's message of Fri Dec 31 16:06:19 -0500 2010:
>
>> This is a good point.  The only worry is that the created directory
>> might conflict with other existing directories.  This problem is not
>> specific to this issue, I just would like checkpkg to give a sane
>> suggestion that does not result in one package creating the
>> directory as root:bin and another as, say, root:lp.
>
> Might this be a better thing for checkpkg to throw a warning/error
> about then?  I'd consider this to be at least as bad as not providing
> the directory.  I'm not positive, but I suspect the new whole-catalog
> file index that checkpkg is using might make this doable/easy too...?

It would require some time to implement.  Checkpkg stores complete
package information in pickled form, in a single mysql table.  (This
effectively uses MySQL as a key-value store.)  Some information is
also represented in other mysql tables, but they don't contain much
detail.  The idea is that some operations require checking the
contents of the whole catalog, and you don't want to unpickle 2500
objects on every checkpkg run.  Instead, we rely on MySQL indexes.

If we want to query the whole catalog for file ownership and
permissions, it has to be represented in the database.  I'll have to
add more columns to the csw_file table.  They currently are:

  basename = sqlobject.UnicodeCol(length=255, notNone=True)
  path = sqlobject.UnicodeCol(notNone=True, length=900)
  line = sqlobject.UnicodeCol(notNone=True, length=900)
  pkginst = sqlobject.ForeignKey('Pkginst', notNone=True)
  srv4_file = sqlobject.ForeignKey('Srv4FileStats')

I'll need to add the user, group and mode.  While I'm at it, I'll see
if I can add the mimetype too.


More information about the maintainers mailing list