Last month I was adding types for dates in JSON.

I have mixed feelings for adding types to metadata.

The "easy" types like integers and time/date just
make it harder to code because of additional special
cases (instead of essentiallt treatin all integers
as network order uint32_t and leave the interpretation
unspecified. Does anyone not now how to convert uglix time(2)?

The "useful" types are tuples like EVRD and that isn't
usually handled by types but rather "collections" of some sort.

I chose to add yime/date types to --json largely because I'm bored.

SHould types like time/data be used when available, thereby
becoming "standard" and imposing a context of interpreteation?

Or should what are essentially uglix stamps be left as integers
to make it as easy to write parsers?

I can tell which way you are headed from the check-in ... same
direction I'm headed with --json.

73 de Jeff

On May 12, 2011, at 2:36 AM, Anders F. Björklund wrote:

>  RPM Package Manager, CVS Repository
>  http://rpm5.org/cvs/
>  ____________________________________________________________________________
> 
>  Server: rpm5.org                         Name:   Anders F. Björklund
>  Root:   /v/rpm/cvs                       Email:  a...@rpm5.org
>  Module: rpm                              Date:   12-May-2011 08:36:53
>  Branch: HEAD                             Handle: 2011051206365201
> 
>  Modified files:
>    rpm/scripts             wnh_other_yaml wnh_primary_yaml
> 
>  Log:
>    yaml: use cvs -q diff -utimestamp for timestamps
> 
>  Summary:
>    Revision    Changes     Path
>    1.4         +1  -1      rpm/scripts/wnh_other_yaml
>    1.4         +2  -2      rpm/scripts/wnh_primary_yaml
>  ____________________________________________________________________________
> 
>  patch -p0 <<'@@ .'
>  Index: rpm/scripts/wnh_other_yaml
>  ============================================================================
>  $ cvs diff -u -r1.3 -r1.4 wnh_other_yaml
>  --- rpm/scripts/wnh_other_yaml       12 May 2011 06:34:03 -0000      1.3
>  +++ rpm/scripts/wnh_other_yaml       12 May 2011 06:36:53 -0000      1.4
>  @@ -12,7 +12,7 @@
>   [\
>   \n   -\
>   \n    Author: %{CHANGELOGNAME}\
>  -\n    Date:   %{CHANGELOGTIME:date}\
>  +\n    Date:   !!timestamp '%{CHANGELOGTIME:isodate}'\
>   \n%{CHANGELOGTEXT:yaml}\
>   ]\
>   }|\
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/scripts/wnh_primary_yaml
>  ============================================================================
>  $ cvs diff -u -r1.3 -r1.4 wnh_primary_yaml
>  --- rpm/scripts/wnh_primary_yaml     12 May 2011 06:34:02 -0000      1.3
>  +++ rpm/scripts/wnh_primary_yaml     12 May 2011 06:36:52 -0000      1.4
>  @@ -11,8 +11,8 @@
>   \n  Description: %{DESCRIPTION:yaml}\
>   \n  Packager:    %|PACKAGER?{%{PACKAGER:yaml}}:{~}|\
>   \n  Url:         %|URL?{%{URL:yaml}}:{~}|\
>  -\n  Filetime:    %{PACKAGETIME:date}\
>  -\n  Buildtime:   %{BUILDTIME:date}\
>  +\n  Filetime:    !!timestamp '%{PACKAGETIME:isodate}'\
>  +\n  Buildtime:   !!timestamp '%{BUILDTIME:isodate}'\
>   \n  Packagesize: %{PACKAGESIZE}\
>   \n  Size:        %{SIZE}\
>   \n  Archivesize: %{ARCHIVESIZE}\
>  @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-...@rpm5.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to