diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-09 11:51:21 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-09 11:51:21 +0200 |
commit | 23c5897cbdb5a957788201a5178e963586dcdbc9 (patch) | |
tree | 8303be690b404c47d7a2da310175e1a40c62348c /apt-pkg/deb/debsystem.cc | |
parent | 6dd8400ca787ef832d87121f304f98ad152dc3a6 (diff) | |
parent | 164fed49362b28c0264c293a14a06d167e32b76f (diff) |
* merge the remaining Ubuntu change:
- on gpg verification failure warn and restore the last known
good state
- on failure display the IP of the server (useful for servers
that use round robin DNS)
- support Original-Maintainer in RewritePackageOrder
- enable cdrom autodetection via libudev by default
- show messsage about Vcs in use when apt-get source is run for
packages maintained in a Vcs
- better support transitional packages with mark auto-installed.
when the transitional package is in "oldlibs" the new package
is not marked auto installed (same is true for section
metapackages)
- provide new "deb mirror://archive.foo/mirrors.list sid main"
method expects a list of mirrors (generated on the server e.g.
via geoip) and will use that, including cycle on failure
- write apport crash file on package failure (disabled by default
on debian until apport is available)
- support mirror failure reporting (disabled by default on debian)
Diffstat (limited to 'apt-pkg/deb/debsystem.cc')
-rw-r--r-- | apt-pkg/deb/debsystem.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 59f826d96..ef5ec9703 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -18,7 +18,6 @@ #include <apt-pkg/error.h> #include <apt-pkg/fileutl.h> #include <apti18n.h> - #include <sys/types.h> #include <unistd.h> #include <dirent.h> @@ -79,8 +78,15 @@ bool debSystem::Lock() { close(LockFD); 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 'dpkg --configure -a' to correct the problem. ")); + "run '%s' to correct the problem. "), cmd); } LockCount++; |