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

Bug#372148: marked as done (debian-policy: old postinst abort-upgrade, not new)



Your message dated Mon, 19 Jun 2006 23:02:04 -0700
with message-id <E1FsZJM-0000Ac-EG@spohr.debian.org>
and subject line Bug#372148: fixed in debian-policy 3.7.2.1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: debian-policy
Version: 3.7.2.0
Severity: normal

$ echo 1 >counter; DPKG_DEBUG=2 sudo dpkg -i a.deb
(Reading database ... 100920 files and directories currently installed.)
Preparing to replace a 1 (using a.deb) ...

Runnning: /var/lib/dpkg/info/a.prerm upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iFR a              1              a
debug: 1 2 0.

Running: /var/lib/dpkg/tmp.ci/preinst upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iHR a              1              a
debug: 2 2 2.
dpkg: error processing a.deb (--install):
 subprocess pre-installation script returned error exit status 2

Running: /var/lib/dpkg/tmp.ci/postrm abort-upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iHR a              1              a
debug: 4 2 0.

Running: /var/lib/dpkg/info/a.postinst abort-upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iU  a              1              a
debug: 8 2 0.
Errors were encountered while processing:
 a.deb

This is inconsistent with the behavior documented in 6.6.3.1.1:
|    3.   1.   If the package is being upgraded, call:
|                   <new-preinst> upgrade <old-version>
|              If this fails, we call:
|                   <new-postrm> abort-upgrade <old-version>
|
|              1.   If that works, then
|
|                        <new-postinst> abort-upgrade <new-version>

The same problem exists in 6.6.5.1.2:
|         2.   If this fails, `dpkg' will attempt:
|                   <new-postrm> failed-upgrade <old-version>
|              If this works, installation continues.  If not, Error
|              unwind:
|                   <old-preinst> abort-upgrade <new-version>
|              If this fails, the old version is left in an "Half
|              Installed" state.  If it works, dpkg now calls:
|                   <new-postrm> abort-upgrade <old-version>
|              If this fails, the old version is left in an "Half
|              Installed" state.  If it works, dpkg now calls:
|                   <new-postinst> abort-upgrade <new-version>
|              If this fails, the old version is in an "Unpacked" state.


$ echo 1 >counter; DPKG_DEBUG=12 sudo dpkg -i a.deb
(Reading database ... 100920 files and directories currently installed.)
Preparing to replace a 1 (using a.deb) ...

Runnning: /var/lib/dpkg/info/a.prerm upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iFR a              1              a
debug: 1 12 0.

Running: /var/lib/dpkg/tmp.ci/preinst upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iHR a              1              a
debug: 2 12 0.
Unpacking replacement a ...

Running: /var/lib/dpkg/info/a.postrm upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iHR a              1              a
debug: 4 12 4.
dpkg: warning - old post-removal script returned error exit status 4
dpkg - trying script from the new package instead ...

Running: /var/lib/dpkg/tmp.ci/postrm failed-upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iHR a              1              a
debug: 8 12 8.
dpkg: error processing a.deb (--install):
 subprocess new post-removal script returned error exit status 8

Running: /var/lib/dpkg/info/a.preinst abort-upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iHR a              1              a
debug: 16 12 0.

Running: /var/lib/dpkg/tmp.ci/postrm abort-upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iHR a              1              a
debug: 32 12 0.

Running: /var/lib/dpkg/info/a.postinst abort-upgrade 1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iU  a              1              a
debug: 64 12 0.
Errors were encountered while processing:
 a.deb

I also suspect a problem with 6.8.4:

|         If the error unwind fails, the package is in an "Half-Installed"
|         state, or else it remains "Installed" - even though all the files
|         may have been deleted..

I think this is meant to be the rollback description for prerm remove,
in the previous subsubsection.  In that case, dpkg hasn't actually
done anything yet, and successful return of postinst abort-remove
indicates that the effects of prerm remove have been undone, and so
"Installed" is the proper state.  In my test, an internal error
following postrm remove leaves the package in a "Half-installed"
state (and only conffiles remain):

|root@andromeda:/tmp/dpkg# echo 1 >counter; DPKG_DEBUG=0 gdb --args dpkg -r a
|GNU gdb 6.4-debian
|Copyright 2005 Free Software Foundation, Inc.
|GDB is free software, covered by the GNU General Public License, and you are
|welcome to change it and/or distribute copies of it under certain conditions.
|Type "show copying" to see the conditions.
|There is absolutely no warranty for GDB.  Type "show warranty" for details.
|This GDB was configured as "i486-linux-gnu"...(no debugging symbols found)
|Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
|
|(gdb) break fork
|Function "fork" not defined.
|Make breakpoint pending on future shared library load? (y or [n]) y
|
|Breakpoint 1 (fork) pending.
|(gdb) r 
|Starting program: /usr/bin/dpkg -r a
|(no debugging symbols found)
|(no debugging symbols found)
|(no debugging symbols found)
|(no debugging symbols found)
|Breakpoint 2 at 0xb7f30bf6
|Pending breakpoint "fork" resolved
|(Reading database ... 100920 files and directories currently installed.)
|Removing a ...
|
|Breakpoint 2, 0xb7f30bf6 in fork () from /lib/tls/i686/cmov/libc.so.6
|(gdb) cont
|Continuing.
|
|Runnning: /var/lib/dpkg/info/a.prerm remove
|Desired=Unknown/Install/Remove/Purge/Hold
|| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
||/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
|||/ Name           Version        Description
|+++-==============-==============-============================================
|rF  a              1              a
|debug: 1 0 0.
|
|Breakpoint 2, 0xb7f30bf6 in fork () from /lib/tls/i686/cmov/libc.so.6
|(gdb) d 2
|(gdb) break unlink
|Breakpoint 3 at 0xb7f622c0
|(gdb) cont
|Continuing.
|
|Running: /var/lib/dpkg/info/a.postrm remove
|Desired=Unknown/Install/Remove/Purge/Hold
|| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
||/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
|||/ Name           Version        Description
|+++-==============-==============-============================================
|rH  a              1              a
|debug: 2 0 0.
|
|Breakpoint 3, 0xb7f622c0 in unlink () from /lib/tls/i686/cmov/libc.so.6
|(gdb) d 3
|(gdb) return -1
|Make selected stack frame return now? (y or n) y
|#0  0x0805b1cb in ?? ()
|(gdb) cont
|Continuing.
|dpkg: error processing a (--remove):
| unable to delete control info file `/var/lib/dpkg/info/a.postinst': No such file or directory
|Errors were encountered while processing:
| a
|
|Program exited with code 01.
|(gdb) shell dpkg -l a
|Desired=Unknown/Install/Remove/Purge/Hold
|| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
||/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
|||/ Name           Version        Description
|+++-==============-==============-============================================
|rH  a              1              a


--- End Message ---
--- Begin Message ---
Source: debian-policy
Source-Version: 3.7.2.1

We believe that the bug you reported is fixed in the latest version of
debian-policy, which is due to be installed in the Debian FTP archive:

debian-policy_3.7.2.1.dsc
  to pool/main/d/debian-policy/debian-policy_3.7.2.1.dsc
debian-policy_3.7.2.1.tar.gz
  to pool/main/d/debian-policy/debian-policy_3.7.2.1.tar.gz
debian-policy_3.7.2.1_all.deb
  to pool/main/d/debian-policy/debian-policy_3.7.2.1_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 372148@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Manoj Srivastava <srivasta@debian.org> (supplier of updated debian-policy package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 20 Jun 2006 00:18:19 -0500
Source: debian-policy
Binary: debian-policy
Architecture: source all
Version: 3.7.2.1
Distribution: unstable
Urgency: low
Maintainer: Debian Policy List <debian-policy@lists.debian.org>
Changed-By: Manoj Srivastava <srivasta@debian.org>
Description: 
 debian-policy - Debian Policy Manual and related documents
Closes: 366032 366466 366889 369011 369413 369912 372147 372148 372497 372522 372731
Changes: 
 debian-policy (3.7.2.1) unstable; urgency=low
 .
   * Bug fix: "debian-policy: s/control are/&amp;a/; s/stats/status/;
     s/and/an/; s/'/&quot;/; s/rewind/unwind/; s/fact/&amp; that/; s/like
     like/look like/;", thanks to Justin Pryzby                (Closes: #372147).
   * Bug fix: "debian-policy: Minor typo in footnote 53", thanks to Jordà
     Polo                                                      (Closes: #372497).
   * Bug fix: "debian-policy: Typo in 9.1.1: &quot;'..' character&quot;
     should be &quot;'.' character&quot;", thanks to Matt Zagrabelny
                                                               (Closes: #372522).
   * Bug fix: "debian-policy: More typos in upgrading-checklist.txt",
     thanks to Kevin B. McCarty                                (Closes: #366466).
   * Bug fix: "typo: package remains in and &quot;Installed' state", thanks
     to Sam Hocevar \(Debian packages\)                        (Closes: #369413).
   * Bug fix: "debian-policy: Cleanup build-dependencies", thanks to Stefan
     Huehner                                                   (Closes: #366032).
   * Bug fix: "debian-policy: 2.2 should be named 'categories'", thanks to
     Thomas Weber                                              (Closes: #369912).
   * Bug fix: "debian-policy: old postinst abort-upgrade, not new", thanks
     to Justin Pryzby. The fix was thanks to Margarita Manterola
                                                               (Closes: #372148).
   * Bug fix: "policy: please say which control fields can line-wrap",
     thanks to Peter Samuelson                                 (Closes: #372731).
   * Bug fix: "debian/copyright should be mentioned in source section",
     thanks to Ian Jackson                                     (Closes: #369011).
   * Bug fix: "GNU office not on Temple Place anymore", thanks to Dan
     Jacobson                                                  (Closes: #366889).
Files: 
 95822650cc21e70c12f0d850cf01ce2f 807 doc optional debian-policy_3.7.2.1.dsc
 b42a2b4bc266d1f21218690ce0df1c61 788462 doc optional debian-policy_3.7.2.1.tar.gz
 93d94fd79594db536eb18c85379d2d93 1524050 doc optional debian-policy_3.7.2.1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEl4v4Ibrau78kQkwRAhU5AJ9A6vxwWTyJE/TRlaPliVuF5n/pOwCgqssQ
gXPciC8/80WPE6Z5pTYWbfg=
=GZw/
-----END PGP SIGNATURE-----


--- End Message ---

Reply to: