On Tue Feb 02, 2016 at 10:16:47PM +0100, Dmitrij D. Czarkoff wrote:
> Landry Breuil said:
> > Doing a FLAVOR for this is just overkill, as 99% of the users wont know
> > which one to choose (shall we build both by default?),
> 
> Idea is that people should install package with no FLAVOR.  If they
> really, really want to have as little dependencies as possible, they
> install "no_x11" FLAVORed package.
> 
> > and expect a non-no_x11 flavor to have some kind of GUI..
> 
> Let them.  Really, X11 does not mean GUI.

I like the flavor idea from Dmitrij. It feels right. Tobias tried it on
sparc64 (Not the flavor but some flags).

So let's try with flavor. Dmitrij has begun so let's (maybe) improve and
test at daily work.

> 
> > Oh, and the code in src/int/file_magic.c even has a fallback to use file
> > %s -b --mime-type called via popen()..
> > 
> > In terms of priority:
> > -----------
> >   if(get_gtk_mimetype(file, mimetype) == -1) 
> >   {
> >     if(get_magic_mimetype(file, mimetype) == -1) 
> >     {
> >       if(get_file_mimetype(file, mimetype, sizeof(mimetype)) == -1) 
> >         return NULL;
> >     }
> >   }
> > -----------
> > 
> > So by default the primary method is gtk, then magic, then file.
> 
> Maybe file is not a bad option - in the end it is the most secure
> filetype detection tool we have in OpenBSD ATM.
> 
> > And if i still look at the code... one of the uses of getting the
> > mimetype of a file seems to be.. to print the mimetype. Another (grep -r
> > get_handlers) seems to be to propose the various mimetype handlers found
> > in the desktop files to handle it. am i reading this right ?
> 
> Well, I don't use file managers, but I suppose that printing mimetype
> and automagically open files in right application is why you may want a
> file managers.  Otherwise cp, rm, ln and cd are your file manager.
> 

Yes, if we disable GTK+ and libmagic we fallback to file(1).

Reply via email to