Error: No ports matched the given expression
Thomas De Contes
d.l.tDeContes at free.fr
Fri Feb 26 14:09:58 PST 2010
Le 25 févr. 10 à 15:37, Thomas De Contes a écrit :
>
> Le 25 févr. 10 à 14:07, Joshua Root a écrit :
>
>> On 2010-2-25 22:47 , Thomas De Contes wrote:
>>> hi :-)
>>>
>>>
>>> + port -u upgrade outdated
>>> Error: No ports matched the given expression
>>> + exit 1
>>>
>>> i would like to keep "|| exit" because sometimes it doesn't
>>> success to
>>> upgrade
>>> could you make port to not give an error code when there are no
>>> ports to
>>> manage, please ? :-)
>>
>> Not really. Internally it's no different to specifying something like
>> port upgrade installed and name:thisportdoesnotexist
>
> i'm not sure to understand
>
> do you
say
> that if i type
> port upgrade installed and name:thisportdoesnotexist
> it gives
> Error: No ports matched the given expression
> (like "port -u upgrade outdated"), and that it's
right
> ?
>
> "installed and name:thisportdoesnotexist" is a valid expression
> which results in no port,
> so i expect "port upgrade"
to
> understand that it has no port to upgrade this time, but not
to
> give an error code
> i find that there is no good reason to not give an error code,
> since the given expression is valid ...
sorry, an error from copy / paste :-)
i find that there is no good reason to give an error code, since the
given expression is valid
i want to say : it could be a good reason, but not necessarry (what
you seem to think),
and concretely, i don't see any real advantages, whereas i have real
disadvantages
do you think i'm wrong ?
>
>
>>
>> Check port outdated first.
>
>
> do you mean that i should do
> port outdated && port -u upgrade outdated || exit "$?"
> ?
>
> it doesn't works, because port outdated doesn't give an error code
>
> moreover,
> $ port installed and name:thisportdoesnotexist && echo n
> + port installed and name:thisportdoesnotexist
> None of the specified ports are installed.
> + echo n
> n
--
Téléassistance / Télémaintenance
http://www.portparallele.com/ThomasDECONTES/
More information about the macports-users
mailing list