Re: querying the registry for installed files

2016-10-28 Thread René J . V . Bertin
On Friday October 28 2016 21:22:41 Clemens Lang wrote:

Hi,
 
> Isn't this essentially what 'port provides' does?

Only if you already know the full path to the file, and if you're only 
interested in the active port.

What I have in mind is two-fold:
- an alternative to spotlight's `mdfind -name` limited to files installed by 
MacPorts (which could be enough justification to exclude ${prefix} from 
SpotLight indexing).
- a way to find the port(s) that install a given file, even if they're not 
currently active (as in, which port was it again I have to activate to 
re-enable that nifty command called something like ...).

Thanks for the suggestions, I'll play around with them!

R.
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: querying the registry for installed files

2016-10-28 Thread Vincent Habchi
> if ‘exp’ is the expression you’re looking for (e.g. ‘%qt4%’ for all files 
> containing …qt4…)
> 
> sqlite> WITH i AS (SELECT id FROM files WHERE path LIKE exp GROUP BY id) 
> SELECT name FROM ports, i WHERE ports.id = i.id;
> 
> Assuming you want the name of the ports which provides the files you’re 
> looking for

Oh, if you want the files, a simple

SELECT path FROM ports WHERE path LIKE exp; 

is enough!

V.

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: querying the registry for installed files

2016-10-28 Thread Vincent Habchi
sqlite3 register.db

if ‘exp’ is the expression you’re looking for (e.g. ‘%qt4%’ for all files 
containing …qt4…)

sqlite> WITH i AS (SELECT id FROM files WHERE path LIKE exp GROUP BY id) SELECT 
name FROM ports, i WHERE ports.id = i.id;

Assuming you want the name of the ports which provides the files you’re looking 
for

Vincent

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: querying the registry for installed files

2016-10-28 Thread Brandon Allbery
"port provides" actually does some extra work to normalize paths before
querying; I believe René is looking for the underlying database, and
possibly its constraints (e.g. whether it includes inactives --- which I
don't think it does).

On Fri, Oct 28, 2016 at 3:20 PM, Ken Cunningham <
ken.cunningham.web...@gmail.com> wrote:

> Rene, do you mean
>
> port provides  /path/to/file
>
> or something fancier?
>
> Ken
>
>
>
> > On Oct 28, 2016, at 11:41 AM, René J.V. Bertin 
> wrote:
> >
> > Hi,
> >
> > I think the registry keeps track of all installed files, whether they
> belong to active or inactive ports, right?
> > If so, is there a way to query the registry with a filename pattern, to
> obtain the full paths of known matching filesand the port(s) which provide
> them?
> >
> > Thanks,
> > René
> > ___
> > macports-dev mailing list
> > macports-dev@lists.macosforge.org
> > https://lists.macosforge.org/mailman/listinfo/macports-dev
>
> ___
> macports-dev mailing list
> macports-dev@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev
>



-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: querying the registry for installed files

2016-10-28 Thread Clemens Lang
On Fri, Oct 28, 2016 at 08:41:58PM +0200, René J.V. Bertin wrote:
> I think the registry keeps track of all installed files, whether they
> belong to active or inactive ports, right?
> If so, is there a way to query the registry with a filename pattern,
> to obtain the full paths of known matching filesand the port(s) which
> provide them?

Isn't this essentially what 'port provides' does?

But yes, that's possible:
 sqlite> .load macports.sqlext
 sqlite> select
  ports.name
, files.path
 from files
 join ports
 on files.id = ports.id
 where
files.active = 1
and ports.name = 'apr'
and files.path like '%/include/%';


-- 
Clemens
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: querying the registry for installed files

2016-10-28 Thread Ken Cunningham
Rene, do you mean 

port provides  /path/to/file

or something fancier?

Ken



> On Oct 28, 2016, at 11:41 AM, René J.V. Bertin  wrote:
> 
> Hi,
> 
> I think the registry keeps track of all installed files, whether they belong 
> to active or inactive ports, right?
> If so, is there a way to query the registry with a filename pattern, to 
> obtain the full paths of known matching filesand the port(s) which provide 
> them?
> 
> Thanks,
> René
> ___
> macports-dev mailing list
> macports-dev@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


querying the registry for installed files

2016-10-28 Thread René J . V . Bertin
Hi,

I think the registry keeps track of all installed files, whether they belong to 
active or inactive ports, right?
If so, is there a way to query the registry with a filename pattern, to obtain 
the full paths of known matching filesand the port(s) which provide them?

Thanks,
René
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [154337] users/devans/GNOME-3/stable/dports/www/libhttpseverywhere

2016-10-28 Thread David Evans
On 10/28/16 7:19 AM, Ryan Schmidt wrote:
> 
>> On Oct 28, 2016, at 3:28 AM, dev...@macports.org wrote:
>>
>> Revision
>> 154337
>> Author
>> dev...@macports.org
>> Date
>> 2016-10-28 10:28:30 +0200 (Fri, 28 Oct 2016)
>> Log Message
>>
>> GNOME-3/stable: libhttpseverywhere, new port, leverage the power of 
>> HTTPSEverywhere to any desktop-application.
>> Added Paths
>>
>>  • users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/
>>  • users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/Portfile
>> Diff
>>
>> Added: users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/Portfile (0 
>> => 154337)
>>
>> --- users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/Portfile   
>> (rev 0)
>> +++ users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/Portfile   
>> 2016-10-28 08:28:30 UTC (rev 154337)
>>
>> @@ -0,0 +1,51 @@
>>
>> +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; 
>> c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
>> +# $Id$
>> +
>> +PortSystem  1.0
>> +PortGroup   github 1.0
>> +
>> +github.setupgrindhold libhttpseverywhere 0.2.3
>> +license LGPL-3
>> +categories  www
>> +maintainers devans openmaintainer
>> +platforms   darwin
>> +
>> +description This library enables you to leverage the power \
>> +of HTTPSEverywhere to any desktop-application.
>> +
>> +long_description${description}. HTTPSEverywhere is a browser plugin \
>> +that comes with a set of rules that you can use \
>> +to ensure that you use HTTP instead of HTTPS only \
>> +when this is absolutely not circumventable. \
>> +With libhttpseverywhere you get a C-bindable, \
>> +GLib-based library you can link/bind against \
>> +in almost all languages
>> +
>> +checksums   rmd160  04d5f814feb434d799e2c43e1a6db8204d8e47f1 \
>> +sha256  
>> 2f32e105e2751c0639892a57d1b652571e08c6937c4cc192cfa1f97cd7f49d0c
>> +
>> +depends_build   port:pkgconfig \
>> +port:meson \
>> +port:ninja \
>> +port:valadoc
>> +
>> +depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \
>> +port:json-glib \
>> +port:gobject-introspection \
>> +port:libarchive \
>> +port:libgee \
>> +port:libsoup \
>> +port:libxml2 \
>> +port:vala
>> +
>> +pre-configure {
>> +xinstall -d -m 755 ${worksrcpath}/build
>> +}
>> +
>> +configure.cmd   cd build && meson ..
>> +
>> +build.cmd   cd build && ninja
>> +build.target
>> +
>> +destroot.cmdcd build && DESTDIR=${destroot} ninja
>> +destroot.destdir
> 
> Why not set configure.dir and build.dir instead of manually running `cd`?
> 

Because these didn't cross my mind at the time. :-)

Thanks for the suggestion.  Will put it on my to do list.

Dave

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [154337] users/devans/GNOME-3/stable/dports/www/libhttpseverywhere

2016-10-28 Thread Ryan Schmidt

> On Oct 28, 2016, at 3:28 AM, dev...@macports.org wrote:
> 
> Revision
> 154337
> Author
> dev...@macports.org
> Date
> 2016-10-28 10:28:30 +0200 (Fri, 28 Oct 2016)
> Log Message
> 
> GNOME-3/stable: libhttpseverywhere, new port, leverage the power of 
> HTTPSEverywhere to any desktop-application.
> Added Paths
> 
>   • users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/
>   • users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/Portfile
> Diff
> 
> Added: users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/Portfile (0 
> => 154337)
> 
> --- users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/Portfile
> (rev 0)
> +++ users/devans/GNOME-3/stable/dports/www/libhttpseverywhere/Portfile
> 2016-10-28 08:28:30 UTC (rev 154337)
> 
> @@ -0,0 +1,51 @@
> 
> +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; 
> c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
> +# $Id$
> +
> +PortSystem  1.0
> +PortGroup   github 1.0
> +
> +github.setupgrindhold libhttpseverywhere 0.2.3
> +license LGPL-3
> +categories  www
> +maintainers devans openmaintainer
> +platforms   darwin
> +
> +description This library enables you to leverage the power \
> +of HTTPSEverywhere to any desktop-application.
> +
> +long_description${description}. HTTPSEverywhere is a browser plugin \
> +that comes with a set of rules that you can use \
> +to ensure that you use HTTP instead of HTTPS only \
> +when this is absolutely not circumventable. \
> +With libhttpseverywhere you get a C-bindable, \
> +GLib-based library you can link/bind against \
> +in almost all languages
> +
> +checksums   rmd160  04d5f814feb434d799e2c43e1a6db8204d8e47f1 \
> +sha256  
> 2f32e105e2751c0639892a57d1b652571e08c6937c4cc192cfa1f97cd7f49d0c
> +
> +depends_build   port:pkgconfig \
> +port:meson \
> +port:ninja \
> +port:valadoc
> +
> +depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \
> +port:json-glib \
> +port:gobject-introspection \
> +port:libarchive \
> +port:libgee \
> +port:libsoup \
> +port:libxml2 \
> +port:vala
> +
> +pre-configure {
> +xinstall -d -m 755 ${worksrcpath}/build
> +}
> +
> +configure.cmd   cd build && meson ..
> +
> +build.cmd   cd build && ninja
> +build.target
> +
> +destroot.cmdcd build && DESTDIR=${destroot} ninja
> +destroot.destdir

Why not set configure.dir and build.dir instead of manually running `cd`?

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Moving to GitHub: Status Update, Action Required

2016-10-28 Thread Rainer Müller
On 2016-10-28 16:02, Craig Treleaven wrote:
>> On Oct 21, 2016, at 2:12 PM, Clemens Lang  wrote:
>> ...
>> Migration Timeline
>> ==
>> The switch to Git will happen on the weekend of October 29th/30th. ...
> 
> Is this still on track?

Yes, expect Subversion to go read-only this weekend. Shortly afterwards,
the repositories on GitHub will be the authoritative source for MacPorts.

The infrastructure team did not schedule the exact time when this will
happen, but definitely this weekend.

Rainer
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Moving to GitHub: Status Update, Action Required

2016-10-28 Thread Ryan Schmidt

> On Oct 28, 2016, at 9:02 AM, Craig Treleaven  wrote:
> 
>> On Oct 21, 2016, at 2:12 PM, Clemens Lang  wrote:
>> ...
>> Migration Timeline
>> ==
>> The switch to Git will happen on the weekend of October 29th/30th. ...
> 
> Is this still on track?

Yes.


___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Moving to GitHub: Status Update, Action Required

2016-10-28 Thread Craig Treleaven
> On Oct 21, 2016, at 2:12 PM, Clemens Lang  wrote:
> ...
> Migration Timeline
> ==
> The switch to Git will happen on the weekend of October 29th/30th. ...

Is this still on track?

Craig
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev