Isaac Bennetch on 22 Jun 2009 08:08:45 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] recent aptitude changes?


On Mon, Jun 22, 2009 at 10:31 AM, Art Alexion<> wrote:
> Version:
> I used to run 'sudo aptitude update && sudo aptitude safe-upgrade' as a single
> command.  Now, it seems that if there are any update errors (like unsigned
> repositories), the command execution stops and safe-upgrade doesn't run.
> It runs fine if I run it by itself and not appended to the update command.

I don't do this specifically but it sounds like the error
reporting/exit status was changed in Aptitude. IIRC, stringing
commands together with && only executes the second command if the
first command exits successfully. || (two pipes) will execute the
second command only if the first command errors (well, returns a
non-zero status).

Try following:
false && echo "some text here"
true && echo "some text here"
false ||  echo "some text here"
true ||  echo "some text here"

If you want to run safe-update regardless of the status of the update, try:
sudo aptitude update; sudo aptitude safe-upgrade

Hope this helps
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --