[Touch-packages] [Bug 1742378] Re: Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in apt-1.2.24

2018-01-31 Thread Launchpad Bug Tracker
This bug was fixed in the package apt - 1.6~alpha7ubuntu1

---
apt (1.6~alpha7ubuntu1) bionic; urgency=medium

  * Try to work around test-method-mirror failure by setting umask at
start

 -- Julian Andres Klode   Wed, 31 Jan 2018 12:19:58
+0100

** Changed in: apt (Ubuntu)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1742378

Title:
  Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in
  apt-1.2.24

Status in apt package in Ubuntu:
  Fix Released

Bug description:
  I accidentally stumbled across this. If in line 22 on_ac_power returns
  a non zero exit code the next line is never reached. Instead, the
  shell terminates immediately with that non zero exit code because of
  "set -e" in line 3. In this script it does not pose a problem because
  the shell is asked to exit anyway if check_power() returns non zero
  but it works differently than is apparently intended (concluding from
  the logic).

  I will attach a suggest patch and a demo illustrating that the patch
  works as the original script seems to intend to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1742378] Re: Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in apt-1.2.24

2018-01-10 Thread Ubuntu Foundations Team Bug Bot
The attachment "Suggested patch to fix" seems to be a patch.  If it
isn't, please remove the "patch" flag from the attachment, remove the
"patch" tag, and if you are a member of the ~ubuntu-reviewers,
unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1742378

Title:
  Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in
  apt-1.2.24

Status in apt package in Ubuntu:
  Fix Committed

Bug description:
  I accidentally stumbled across this. If in line 22 on_ac_power returns
  a non zero exit code the next line is never reached. Instead, the
  shell terminates immediately with that non zero exit code because of
  "set -e" in line 3. In this script it does not pose a problem because
  the shell is asked to exit anyway if check_power() returns non zero
  but it works differently than is apparently intended (concluding from
  the logic).

  I will attach a suggest patch and a demo illustrating that the patch
  works as the original script seems to intend to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1742378] Re: Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in apt-1.2.24

2018-01-09 Thread rklemme
@Julian I had considered that.  This could be more easily done with
"on_ac_power || return 1" - there is no need for full "if...then...fi".

But both those solutions would have different semantics than what the
script _apparently_ intends to do: on_ac_power returns 0 on AC, 1 on
battery and 255 if the power status cannot be determined.  The current
code of the script indicates that in this case
/usr/lib/apt/apt.systemd.daily should be executed and _only_ be omitted
if on_ac_power returns exactly 1.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1742378

Title:
  Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in
  apt-1.2.24

Status in apt package in Ubuntu:
  Fix Committed

Bug description:
  I accidentally stumbled across this. If in line 22 on_ac_power returns
  a non zero exit code the next line is never reached. Instead, the
  shell terminates immediately with that non zero exit code because of
  "set -e" in line 3. In this script it does not pose a problem because
  the shell is asked to exit anyway if check_power() returns non zero
  but it works differently than is apparently intended (concluding from
  the logic).

  I will attach a suggest patch and a demo illustrating that the patch
  works as the original script seems to intend to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1742378] Re: Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in apt-1.2.24

2018-01-09 Thread Julian Andres Klode
Fixed in https://salsa.debian.org/apt-
team/apt/commit/ca2fcc639c7363a04998f650b96573d806b32dd2

** Changed in: apt (Ubuntu)
   Status: Triaged => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1742378

Title:
  Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in
  apt-1.2.24

Status in apt package in Ubuntu:
  Fix Committed

Bug description:
  I accidentally stumbled across this. If in line 22 on_ac_power returns
  a non zero exit code the next line is never reached. Instead, the
  shell terminates immediately with that non zero exit code because of
  "set -e" in line 3. In this script it does not pose a problem because
  the shell is asked to exit anyway if check_power() returns non zero
  but it works differently than is apparently intended (concluding from
  the logic).

  I will attach a suggest patch and a demo illustrating that the patch
  works as the original script seems to intend to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1742378] Re: Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in apt-1.2.24

2018-01-09 Thread Julian Andres Klode
I'd rather use if ! on_ac_power; then return 1; fi

** Changed in: apt (Ubuntu)
   Importance: Undecided => Low

** Changed in: apt (Ubuntu)
   Status: New => Triaged

** Changed in: apt (Ubuntu)
 Assignee: (unassigned) => Julian Andres Klode (juliank)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1742378

Title:
  Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in
  apt-1.2.24

Status in apt package in Ubuntu:
  Triaged

Bug description:
  I accidentally stumbled across this. If in line 22 on_ac_power returns
  a non zero exit code the next line is never reached. Instead, the
  shell terminates immediately with that non zero exit code because of
  "set -e" in line 3. In this script it does not pose a problem because
  the shell is asked to exit anyway if check_power() returns non zero
  but it works differently than is apparently intended (concluding from
  the logic).

  I will attach a suggest patch and a demo illustrating that the patch
  works as the original script seems to intend to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1742378] Re: Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in apt-1.2.24

2018-01-09 Thread Julian Andres Klode
or well, use an explicit if

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1742378

Title:
  Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in
  apt-1.2.24

Status in apt package in Ubuntu:
  Triaged

Bug description:
  I accidentally stumbled across this. If in line 22 on_ac_power returns
  a non zero exit code the next line is never reached. Instead, the
  shell terminates immediately with that non zero exit code because of
  "set -e" in line 3. In this script it does not pose a problem because
  the shell is asked to exit anyway if check_power() returns non zero
  but it works differently than is apparently intended (concluding from
  the logic).

  I will attach a suggest patch and a demo illustrating that the patch
  works as the original script seems to intend to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1742378] Re: Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in apt-1.2.24

2018-01-09 Thread rklemme
I forgot to mention one thing about the patch: the current behavior is
that when on_ac_power returns 255 the current version of the script
returns with that non zero error code and does not execute
/usr/lib/apt/apt.systemd.daily.  The patched version will execute
/usr/lib/apt/apt.systemd.daily and terminate with whatever exit code
that process generates.

On a side note, "which" can be replaced by "type" which is POSIX
compatible and a shell built in.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1742378

Title:
  Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in
  apt-1.2.24

Status in apt package in Ubuntu:
  Triaged

Bug description:
  I accidentally stumbled across this. If in line 22 on_ac_power returns
  a non zero exit code the next line is never reached. Instead, the
  shell terminates immediately with that non zero exit code because of
  "set -e" in line 3. In this script it does not pose a problem because
  the shell is asked to exit anyway if check_power() returns non zero
  but it works differently than is apparently intended (concluding from
  the logic).

  I will attach a suggest patch and a demo illustrating that the patch
  works as the original script seems to intend to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1742378] Re: Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in apt-1.2.24

2018-01-09 Thread rklemme
Produces this output:

$ sh check_power_test.sh 
+ echo begin
begin
+ check_power 0
+ exit 0
+ return 0
+ check_power 1
+ exit 1
+ [ 1 -ne 1 ]
+ return 1
+ echo ignore
ignore
+ check_power 255
+ exit 255
+ [ 255 -ne 1 ]
+ return 0
+ echo end
end


** Attachment added: "Demonstration of behavior of the patch"
   
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+attachment/5034118/+files/check_power_test.sh

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1742378

Title:
  Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in
  apt-1.2.24

Status in apt package in Ubuntu:
  New

Bug description:
  I accidentally stumbled across this. If in line 22 on_ac_power returns
  a non zero exit code the next line is never reached. Instead, the
  shell terminates immediately with that non zero exit code because of
  "set -e" in line 3. In this script it does not pose a problem because
  the shell is asked to exit anyway if check_power() returns non zero
  but it works differently than is apparently intended (concluding from
  the logic).

  I will attach a suggest patch and a demo illustrating that the patch
  works as the original script seems to intend to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1742378] Re: Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in apt-1.2.24

2018-01-09 Thread rklemme
** Patch added: "Suggested patch to fix"
   
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+attachment/5034117/+files/apt-compat-3.patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1742378

Title:
  Slight glitch in /etc/cron.daily/apt-compat Ubuntu 16.04.3 in
  apt-1.2.24

Status in apt package in Ubuntu:
  New

Bug description:
  I accidentally stumbled across this. If in line 22 on_ac_power returns
  a non zero exit code the next line is never reached. Instead, the
  shell terminates immediately with that non zero exit code because of
  "set -e" in line 3. In this script it does not pose a problem because
  the shell is asked to exit anyway if check_power() returns non zero
  but it works differently than is apparently intended (concluding from
  the logic).

  I will attach a suggest patch and a demo illustrating that the patch
  works as the original script seems to intend to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1742378/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp