Re: Distinguishing between deactivated ports than I want to keep and outdated port I no longer care about

2016-02-24 Thread Clemens Lang
Hi,

On Wed, Feb 24, 2016 at 01:56:55AM -0600, Ryan Schmidt wrote:
> > Is there any equivalent of "port installed" that also shows whether
> > a port was requested
> 
> No, but you can show installed requested ports with "port installed
> requested" and installed unrequested ports with "port installed
> unrequested". If you want a combined list you could use:
> 
> (port -q installed requested | sed 's/$/ (requested)/' && port -q installed 
> unrequested | sed 's/$/ (unrequested)/') | sort

port installed \
inactive and \
unrequested and not \
( $(port -q echo requested | sed -E 's/^/rdependentof:/') \)

might give you exactly the list you're looking for? Because I'm lacking
a test setup for this I cannot verify that this works as I think it
should, though.

> > and the size of .tar.bz2 with binaries?
> 
> To see the disk space used by the installed files of a port, you can use:
> 
> port space name-of-port
> 
> I'm not sure if that includes the size of the .tbz2 archive file. To get that 
> separately, you can look at:
> 
> ls -l /opt/local/var/macports/software/name-of-port/

Or rather: ls -l "$(port -q location "$portname")"

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


Re: Distinguishing between deactivated ports than I want to keep and outdated port I no longer care about

2016-02-23 Thread Ryan Schmidt

On Feb 24, 2016, at 1:45 AM, Mojca Miklavec wrote:

> I now tried running
>sudo port uninstall inactive and not requested
> This seems to basically work, but it fails when an inactive
> unrequested port is a dependency of another inactive requested port.
> (Or at least that's what I suspect is happening.)

That sounds plausible.


> Is there any equivalent of "port installed" that also shows whether a
> port was requested

No, but you can show installed requested ports with "port installed requested" 
and installed unrequested ports with "port installed unrequested". If you want 
a combined list you could use:

(port -q installed requested | sed 's/$/ (requested)/' && port -q installed 
unrequested | sed 's/$/ (unrequested)/') | sort

> and the size of .tar.bz2 with binaries?

To see the disk space used by the installed files of a port, you can use:

port space name-of-port

I'm not sure if that includes the size of the .tbz2 archive file. To get that 
separately, you can look at:

ls -l /opt/local/var/macports/software/name-of-port/


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


Re: Distinguishing between deactivated ports than I want to keep and outdated port I no longer care about

2016-02-23 Thread Mojca Miklavec
On 23 February 2016 at 21:38, Ryan Schmidt wrote:
> On Feb 23, 2016, at 1:43 PM, Mojca Miklavec wrote:
>
>> I often deactivate certain "heavy" ports where I want to play with
>> different versions or variants. Sometimes I deactivate clang 3.8 when
>> I don't feel like waiting for the long recompilation of the latest and
>> greatest new version (that will be outdated again in a few days
>> anyway) or when a newer version no longer works/compiles. Sometimes I
>> deactivate universal ports. Those are generally the ports I want to
>> keep for some time.
>>
>> But I would like to save space and uninstall other ports that I don't
>> particularly care about (which have been superseded by newer
>> versions).
>>
>> Is there any way to flag a certain set of inactive ports that I
>> specifically want to keep even after "sudo port uninstall inactive
>> [and somethingelse]"?
>
> The way to flag a port as wanted is:
>
> sudo port setrequested name-of-port
>
> The way to flag a port as not wanted is:
>
> sudo port unsetrequested name-of-port
>
> Or:
>
> sudo port setunrequested name-of-port
>
> Then you can use the "requested" and "unrequested" pseudoports when selecting 
> ports:
>
> sudo port uninstall inactive and unrequested
>
> This would apply to all variants and versions of a given port name, however. 
> There is no provision for, for example, marking the non-universal version of 
> a port requested while marking the universal version of that same port as 
> unrequested.

Thank you.

I now tried running
sudo port uninstall inactive and not requested
This seems to basically work, but it fails when an inactive
unrequested port is a dependency of another inactive requested port.
(Or at least that's what I suspect is happening.)

Is there any equivalent of "port installed" that also shows whether a
port was requested and the size of .tar.bz2 with binaries?

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


Re: Distinguishing between deactivated ports than I want to keep and outdated port I no longer care about

2016-02-23 Thread Ryan Schmidt

On Feb 23, 2016, at 1:43 PM, Mojca Miklavec wrote:

> I often deactivate certain "heavy" ports where I want to play with
> different versions or variants. Sometimes I deactivate clang 3.8 when
> I don't feel like waiting for the long recompilation of the latest and
> greatest new version (that will be outdated again in a few days
> anyway) or when a newer version no longer works/compiles. Sometimes I
> deactivate universal ports. Those are generally the ports I want to
> keep for some time.
> 
> But I would like to save space and uninstall other ports that I don't
> particularly care about (which have been superseded by newer
> versions).
> 
> Is there any way to flag a certain set of inactive ports that I
> specifically want to keep even after "sudo port uninstall inactive
> [and somethingelse]"?

The way to flag a port as wanted is:

sudo port setrequested name-of-port

The way to flag a port as not wanted is:

sudo port unsetrequested name-of-port

Or:

sudo port setunrequested name-of-port

Then you can use the "requested" and "unrequested" pseudoports when selecting 
ports:

sudo port uninstall inactive and unrequested

This would apply to all variants and versions of a given port name, however. 
There is no provision for, for example, marking the non-universal version of a 
port requested while marking the universal version of that same port as 
unrequested.

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


Re: Distinguishing between deactivated ports than I want to keep and outdated port I no longer care about

2016-02-23 Thread Michael Dickens
I don't think there's such a way to flag certain ports, but I'd love to
see it in place for exactly the reasons Mojca describes -- especially
for the purposes of "reclaim". - MLD

On Tue, Feb 23, 2016, at 02:43 PM, Mojca Miklavec wrote:
> I often deactivate certain "heavy" ports where I want to play with
> different versions or variants. Sometimes I deactivate clang 3.8 when
> I don't feel like waiting for the long recompilation of the latest and
> greatest new version (that will be outdated again in a few days
> anyway) or when a newer version no longer works/compiles. Sometimes I
> deactivate universal ports. Those are generally the ports I want to
> keep for some time.
> 
> But I would like to save space and uninstall other ports that I don't
> particularly care about (which have been superseded by newer
> versions).
> 
> Is there any way to flag a certain set of inactive ports that I
> specifically want to keep even after "sudo port uninstall inactive
> [and somethingelse]"?
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev