Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #241694
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: is dpkg install atomic? |
| Date | 2021-10-26 20:20 +0200 |
| Message-ID | <Dczdf-7hX-1@gated-at.bofh.it> (permalink) |
| References | <DcyKd-6RI-1@gated-at.bofh.it> <DcyTU-6Vg-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue 26 Oct 2021 at 13:57:13 -0400, Roberto C. Sánchez wrote: > On Tue, Oct 26, 2021 at 10:31:54AM -0700, Han wrote: > > Hi, > > This might be a dumb question: is dpkg installing (or updating) a package > > using a .deb file atomic in the event of power outage? > > By atomic, I meant either the new version of the application is fully > > installed, or not at all. Is this always guaranteed? > > I read the `man dpkg` doc, but couldn't find a clear answer. I might have > > missed it though. > > Thanks, > > Han > > It's not a dumb question. The installation of a package might seem, > from the user perspective, like it could be atomic, but it is really > made up of a variety of steps. Indeed. > Broadly, the package is downloaded, then unpacked, then any included > pre-installation script is executed, the unpacked contents are placed in > their location on the system, and then any included post-installation > script is executed. A power outage at any point in the process could > leave the package in a state where is it is not fully installed. > Though, generally speaking, a situation like that can almost always be > recovered from by a command like 'apt-get install --reinstall <pkg>'. > However, there might circumstances where more advanced techniques might > be required. Assuming that Ctrl-C while dpkg or apt is running is equivalent to a power outage, I have found that running the specific command afterwards is generally successful. -- Brian.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
is dpkg install atomic? Han <keepsimple@gmail.com> - 2021-10-26 20:00 +0200
Re: is dpkg install atomic? Greg Wooledge <greg@wooledge.org> - 2021-10-26 20:00 +0200
Re: is dpkg install atomic? Roberto C. Sánchez <roberto@debian.org> - 2021-10-26 20:00 +0200
Re: is dpkg install atomic? Brian <ad44@cityscape.co.uk> - 2021-10-26 20:20 +0200
Re: is dpkg install atomic? David Wright <deblis@lionunicorn.co.uk> - 2021-10-26 22:10 +0200
csiph-web