From 863e3d03d1c268acc95e3ceab5c1c36d764eb250 Mon Sep 17 00:00:00 2001 From: picca Date: Tue, 29 Mar 2016 16:58:05 +0000 Subject: Added a comment --- ...ent_2_be3846f1cf7853beb486afc2077cd8b2._comment | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 doc/forum/chroot_issue_when_upgrading/comment_2_be3846f1cf7853beb486afc2077cd8b2._comment (limited to 'doc/forum/chroot_issue_when_upgrading') diff --git a/doc/forum/chroot_issue_when_upgrading/comment_2_be3846f1cf7853beb486afc2077cd8b2._comment b/doc/forum/chroot_issue_when_upgrading/comment_2_be3846f1cf7853beb486afc2077cd8b2._comment new file mode 100644 index 00000000..6999ceb1 --- /dev/null +++ b/doc/forum/chroot_issue_when_upgrading/comment_2_be3846f1cf7853beb486afc2077cd8b2._comment @@ -0,0 +1,29 @@ +[[!comment format=mdwn + username="picca" + subject="comment 2" + date="2016-03-29T16:58:05Z" + content=""" +Hello, joey now that I installed 2.17.1 I can test the fix but... + + [2016-03-29 16:50:06 UTC] call: apt-get [\"update\"] + [2016-03-29 16:50:06 UTC] fgProcess (\"apt-get\",[\"update\"]) + E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. + [2016-03-29 16:50:07 UTC] fgProcess done (\"apt-get\",[\"update\"]) + [2016-03-29 16:50:07 UTC] process done ExitFailure 100 + +my property is + + chroot = Chroot.debootstrapped Debootstrap.BuilddD chrootdir + & os system + & case proxy of + (Just p) -> \"/etc/apt/apt.conf.d/01proxy\" `File.hasContent` [\"Acquire::http::Proxy \\"\" ++ p ++ \"\\";\"] + Nothing -> doNothing + & Apt.installed [\"apt-transport-https\"] + & Apt.stdSourcesList + & Apt.update `onChange` Apt.upgrade + & Apt.cacheCleaned + +so it failes in the Apt.update and do not reach Apt.upgrade +so it seems that update should be fixed also :) + +"""]] -- cgit v1.3-2-g0d8e From c48734099c153b2f79b16e4776da01be590c6675 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 29 Mar 2016 16:55:38 -0400 Subject: comment --- .../comment_3_f902730900901dccdf2e290a176458f9._comment | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/forum/chroot_issue_when_upgrading/comment_3_f902730900901dccdf2e290a176458f9._comment (limited to 'doc/forum/chroot_issue_when_upgrading') diff --git a/doc/forum/chroot_issue_when_upgrading/comment_3_f902730900901dccdf2e290a176458f9._comment b/doc/forum/chroot_issue_when_upgrading/comment_3_f902730900901dccdf2e290a176458f9._comment new file mode 100644 index 00000000..17c02fe7 --- /dev/null +++ b/doc/forum/chroot_issue_when_upgrading/comment_3_f902730900901dccdf2e290a176458f9._comment @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 3""" + date="2016-03-29T20:49:32Z" + content=""" +Hmm, I don't ever remember seeing apt-get update need dpkg --configure -a. +It's rather weird that it would; the files it updates are fully independent +of the files dpkg does AIUI. +"""]] -- cgit v1.3-2-g0d8e From 6a429dccd8d9cc184198d2bae0a7da2256d3153d Mon Sep 17 00:00:00 2001 From: picca Date: Tue, 29 Mar 2016 21:36:11 +0000 Subject: Added a comment --- .../comment_4_4004abde37eb4bc7d845fb7bba2c635d._comment | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/forum/chroot_issue_when_upgrading/comment_4_4004abde37eb4bc7d845fb7bba2c635d._comment (limited to 'doc/forum/chroot_issue_when_upgrading') diff --git a/doc/forum/chroot_issue_when_upgrading/comment_4_4004abde37eb4bc7d845fb7bba2c635d._comment b/doc/forum/chroot_issue_when_upgrading/comment_4_4004abde37eb4bc7d845fb7bba2c635d._comment new file mode 100644 index 00000000..65ca065e --- /dev/null +++ b/doc/forum/chroot_issue_when_upgrading/comment_4_4004abde37eb4bc7d845fb7bba2c635d._comment @@ -0,0 +1,14 @@ +[[!comment format=mdwn + username="picca" + subject="comment 4" + date="2016-03-29T21:36:11Z" + content=""" +I found this in the apt code + + #: apt-pkg/deb/debsystem.cc:82 + msgid \"\" + \"dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct \" + \"the problem. \" + msgstr \"\" + +"""]] -- cgit v1.3-2-g0d8e From 65242c9b280dce4baffb78ea313887159bf67d19 Mon Sep 17 00:00:00 2001 From: picca Date: Tue, 29 Mar 2016 21:39:42 +0000 Subject: Added a comment --- ...ent_5_9450d3aad28f45370d32a187c891dbf5._comment | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 doc/forum/chroot_issue_when_upgrading/comment_5_9450d3aad28f45370d32a187c891dbf5._comment (limited to 'doc/forum/chroot_issue_when_upgrading') diff --git a/doc/forum/chroot_issue_when_upgrading/comment_5_9450d3aad28f45370d32a187c891dbf5._comment b/doc/forum/chroot_issue_when_upgrading/comment_5_9450d3aad28f45370d32a187c891dbf5._comment new file mode 100644 index 00000000..0f4fbb85 --- /dev/null +++ b/doc/forum/chroot_issue_when_upgrading/comment_5_9450d3aad28f45370d32a187c891dbf5._comment @@ -0,0 +1,25 @@ +[[!comment format=mdwn + username="picca" + subject="comment 5" + date="2016-03-29T21:39:42Z" + content=""" +Here the c++ code of apt + + // See if we need to abort with a dirty journal + if (CheckUpdates() == true) + { + close(d->LockFD); + d->LockFD = -1; + const char *cmd; + if (getenv(\"SUDO_USER\") != NULL) + cmd = \"sudo dpkg --configure -a\"; + else + cmd = \"dpkg --configure -a\"; + // TRANSLATORS: the %s contains the recovery command, usually + // dpkg --configure -a + return _error->Error(_(\"dpkg was interrupted, you must manually \" + \"run '%s' to correct the problem. \"), cmd); + } + + +"""]] -- cgit v1.3-2-g0d8e From 0209ad7c7b2b8b5b08542fdeb4428294b65df13e Mon Sep 17 00:00:00 2001 From: picca Date: Tue, 29 Mar 2016 21:40:02 +0000 Subject: removed --- ...ent_5_9450d3aad28f45370d32a187c891dbf5._comment | 25 ---------------------- 1 file changed, 25 deletions(-) delete mode 100644 doc/forum/chroot_issue_when_upgrading/comment_5_9450d3aad28f45370d32a187c891dbf5._comment (limited to 'doc/forum/chroot_issue_when_upgrading') diff --git a/doc/forum/chroot_issue_when_upgrading/comment_5_9450d3aad28f45370d32a187c891dbf5._comment b/doc/forum/chroot_issue_when_upgrading/comment_5_9450d3aad28f45370d32a187c891dbf5._comment deleted file mode 100644 index 0f4fbb85..00000000 --- a/doc/forum/chroot_issue_when_upgrading/comment_5_9450d3aad28f45370d32a187c891dbf5._comment +++ /dev/null @@ -1,25 +0,0 @@ -[[!comment format=mdwn - username="picca" - subject="comment 5" - date="2016-03-29T21:39:42Z" - content=""" -Here the c++ code of apt - - // See if we need to abort with a dirty journal - if (CheckUpdates() == true) - { - close(d->LockFD); - d->LockFD = -1; - const char *cmd; - if (getenv(\"SUDO_USER\") != NULL) - cmd = \"sudo dpkg --configure -a\"; - else - cmd = \"dpkg --configure -a\"; - // TRANSLATORS: the %s contains the recovery command, usually - // dpkg --configure -a - return _error->Error(_(\"dpkg was interrupted, you must manually \" - \"run '%s' to correct the problem. \"), cmd); - } - - -"""]] -- cgit v1.3-2-g0d8e From 8461cad491c085c9e6211574671e6621134ed53b Mon Sep 17 00:00:00 2001 From: picca Date: Tue, 29 Mar 2016 21:41:50 +0000 Subject: Added a comment --- ...ent_5_fe9deffb0cd356787fed33a373115f73._comment | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/forum/chroot_issue_when_upgrading/comment_5_fe9deffb0cd356787fed33a373115f73._comment (limited to 'doc/forum/chroot_issue_when_upgrading') diff --git a/doc/forum/chroot_issue_when_upgrading/comment_5_fe9deffb0cd356787fed33a373115f73._comment b/doc/forum/chroot_issue_when_upgrading/comment_5_fe9deffb0cd356787fed33a373115f73._comment new file mode 100644 index 00000000..43f12d0f --- /dev/null +++ b/doc/forum/chroot_issue_when_upgrading/comment_5_fe9deffb0cd356787fed33a373115f73._comment @@ -0,0 +1,26 @@ +[[!comment format=mdwn + username="picca" + subject="comment 5" + date="2016-03-29T21:41:50Z" + content=""" +Here the c++ code of apt + + // See if we need to abort with a dirty journal + if (CheckUpdates() == true) + { + close(d->LockFD); + d->LockFD = -1; + const char *cmd; + if (getenv(\"SUDO_USER\") != NULL) + cmd = \"sudo dpkg --configure -a\"; + else + cmd = \"dpkg --configure -a\"; + // TRANSLATORS: the %s contains the recovery command, usually + // dpkg --configure -a + return _error->Error(_(\"dpkg was interrupted, you must manually \" + \"run '%s' to correct the problem. \"), cmd); + } + +so there is a dirty journal. (maybe due to a power off during the chroot update) + +"""]] -- cgit v1.3-2-g0d8e From adc7dad3d8b86b1ad770d1c82a66cd4df7bbee20 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 30 Mar 2016 10:44:27 -0400 Subject: Apt.update: Also run dpkg --configure -a here as apt for some reason won't even update if dpkg was interrupted. --- debian/changelog | 2 ++ .../comment_6_262df826e5bbd0130964e0433fb172f2._comment | 7 +++++++ src/Propellor/Property/Apt.hs | 8 +++++--- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 doc/forum/chroot_issue_when_upgrading/comment_6_262df826e5bbd0130964e0433fb172f2._comment (limited to 'doc/forum/chroot_issue_when_upgrading') diff --git a/debian/changelog b/debian/changelog index cd7a4c79..b85c836f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ propellor (2.17.1) unstable; urgency=medium * Uwsgi: add ".ini" extension to app config files. Files without extensions were ignored by uwsgi. Thanks, Félix Sipma. + * Apt.update: Also run dpkg --configure -a here as apt for some reason + won't even update if dpkg was interrupted. -- Joey Hess Mon, 28 Mar 2016 11:06:34 -0400 diff --git a/doc/forum/chroot_issue_when_upgrading/comment_6_262df826e5bbd0130964e0433fb172f2._comment b/doc/forum/chroot_issue_when_upgrading/comment_6_262df826e5bbd0130964e0433fb172f2._comment new file mode 100644 index 00000000..00a282bf --- /dev/null +++ b/doc/forum/chroot_issue_when_upgrading/comment_6_262df826e5bbd0130964e0433fb172f2._comment @@ -0,0 +1,7 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 6""" + date="2016-03-30T14:44:03Z" + content=""" +All right then, I've combined pendingConfigured into Apt.update. +"""]] diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 7301a6ae..b9182baf 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -119,9 +119,11 @@ noninteractiveEnv = ] update :: Property NoInfo -update = runApt ["update"] - `assume` MadeChange - `describe` "apt update" +update = combineProperties ("apt update") + [ pendingConfigured + , runApt ["update"] + `assume` MadeChange + ] -- | Have apt upgrade packages, adding new packages and removing old as -- necessary. -- cgit v1.3-2-g0d8e