ng0 transcribed 3.2K bytes:
> Christian Grothoff transcribed 29K bytes:
> > On 09/14/2017 02:41 PM, ng0 wrote:
> > > Hi Christian and LRN.
> > > 
> > > I'm going through `gnunet-guile` at the moment
> > > to understand and improve it.
> > > I just found this comment in it (with context):
> > > 
> > > ```
> > > (define metadata-type-alist
> > >   '((#:filename          .   2)
> > >     (#:publication-date  .  24)
> > >     (#:unknown           .  45)
> > >     (#:original-filename . 180)
> > >     ;; temporary until the right meta-type is added to libextractor
> > >     (#:narinfo           . 230)))
> > > 
> > > ```
> > > 
> > > Read gnu/gnunet/container/metadata.scm in 'gnunet-guile'
> > > on our git server if you need more context.
> > > 
> > > This is work mainly from GSoC 2015.
> > > Has a meta-type (?) for narinfo been added to
> > > libextractor since then?
> > > If not, what's needed to get it in?
> > 
> > Well, it's an enum value, so first a trivial patch to extractor.h, plus
> > a human-readable textual description in src/main/extractor_metatypes.c
> > of what "narinfo" is about.
> 
> Okay, thanks.
> I'll see what I can come up with as soon as I can
> work on it.
> 
> > I'm confused by the choice of 230, the next
> > free value is 229, and we should not leave holes.  So unless
> > compatibility is an issue, the value should probably be changed to 229.
> 
> As far as I could see, and given that this application
> (gnunet-guile) is currently not in use anywhere there's
> no compability to consider. I changed it to 229.

I was able to work on it already.

I hope there's a specification somewhere (if you need it),
the only references are Nix and Guix.
https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-archive.html#Invoking-guix-archive

I've attached my addition of nar and narinfo, haven't run a build
with it but it shouldn't break anything.
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://krosos.org/dist/keys/
https://www.infotropique.org https://www.krosos.org
From bff27bf9248a549106b660d0f4c3a3ba6131bef3 Mon Sep 17 00:00:00 2001
From: ng0 <[email protected]>
Date: Thu, 14 Sep 2017 15:04:13 +0000
Subject: [PATCH] Add nar and narinfo.

---
 src/include/extractor.h        | 5 ++++-
 src/main/extractor_metatypes.c | 8 +++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/include/extractor.h b/src/include/extractor.h
index 9bce88c..099e13a 100644
--- a/src/include/extractor.h
+++ b/src/include/extractor.h
@@ -385,7 +385,10 @@ enum EXTRACTOR_MetaType
 
     EXTRACTOR_METATYPE_AUDIO_PREVIEW = 228,
 
-    EXTRACTOR_METATYPE_LAST = 229
+    EXTRACTOR_METATYPE_NARINFO = 229,
+    EXTRACTOR_METATYPE_NAR = 230,
+
+    EXTRACTOR_METATYPE_LAST = 231
   };
 
 /** @} */ /* end of meta data types */
diff --git a/src/main/extractor_metatypes.c b/src/main/extractor_metatypes.c
index ac159d1..41d1061 100644
--- a/src/main/extractor_metatypes.c
+++ b/src/main/extractor_metatypes.c
@@ -550,7 +550,13 @@ static const struct MetaTypeDescription 
meta_type_descriptions[] = {
 
   { gettext_noop ("audio preview"),
     gettext_noop ("a preview of the file audio stream") },
-       
+
+  { gettext_noop ("narinfo"),
+    gettext_noop ("file containing information about contents of a normalized 
archive (nar)") },
+  /* 230 */
+  { gettext_noop ("nar"),
+    gettext_noop ("normalized archive") },
+
   { gettext_noop ("last"),
     gettext_noop ("last") }
 };
-- 
2.14.1

Attachment: signature.asc
Description: PGP signature

_______________________________________________
GNUnet-developers mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnunet-developers

Reply via email to