summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-02-23 00:45:56 +0100
committerMichael Vogt <mvo@debian.org>2014-02-23 00:45:56 +0100
commiteccff323a093d91fff379e7c8460d7e5c8db8ad1 (patch)
treed539d21c6716af3122edabae91feadccfb3c12ad /cmdline
parent2c678b0a026ac9d44c8ade07aa8bf318faf5a9e2 (diff)
parentb7ed961b8099c05f65e18d4c73ead50cc5c8bff1 (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: debian/changelog
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-config.cc2
-rw-r--r--cmdline/apt-extracttemplates.cc18
-rw-r--r--cmdline/apt-get.cc4
-rw-r--r--cmdline/apt-internal-solver.cc6
-rw-r--r--cmdline/apt-key.in4
-rw-r--r--cmdline/makefile33
6 files changed, 31 insertions, 36 deletions
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 3481eaf5f..30c2a22d5 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -8,7 +8,7 @@
This program will parse a config file and then do something with it.
Commands:
- shell - Shell mode. After this a series of word pairs should occure.
+ shell - Shell mode. After this a series of word pairs should occur.
The first is the environment var to set and the second is
the key to set it from. Use like:
eval `apt-config shell QMode apt::QMode`
diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc
index 8e1937113..2408a7d9d 100644
--- a/cmdline/apt-extracttemplates.cc
+++ b/cmdline/apt-extracttemplates.cc
@@ -24,8 +24,7 @@
#include <apt-pkg/pkgcachegen.h>
#include <apt-pkg/version.h>
#include <apt-pkg/tagfile.h>
-#include <apt-pkg/extracttar.h>
-#include <apt-pkg/arfile.h>
+#include <apt-pkg/debfile.h>
#include <apt-pkg/deblistparser.h>
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
@@ -91,18 +90,9 @@ string DebFile::GetInstalledVer(const string &package)
/* */
bool DebFile::Go()
{
- ARArchive AR(File);
- if (_error->PendingError() == true)
- return false;
-
- const ARArchive::Member *Member = AR.FindMember("control.tar.gz");
- if (Member == 0)
- return _error->Error(_("%s not a valid DEB package."),File.Name().c_str());
-
- if (File.Seek(Member->Start) == false)
- return false;
- ExtractTar Tar(File, Member->Size,"gzip");
- return Tar.Go(*this);
+ debDebFile Deb(File);
+
+ return Deb.ExtractTarMember(*this, "control.tar");
}
/*}}}*/
// DebFile::DoItem examine element in package and mark /*{{{*/
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index c956f557a..3bdc63217 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -15,7 +15,7 @@
upgrade - Smart-Download the newest versions of all packages
dselect-upgrade - Follows dselect's changes to the Status: field
and installes new and removes old packages
- dist-upgrade - Powerfull upgrader designed to handle the issues with
+ dist-upgrade - Powerful upgrader designed to handle the issues with
a new distribution.
install - Download and install a given package (by name, not by .deb)
check - Update the package cache and check for broken packages
@@ -513,7 +513,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL)
}
/* Resolve any problems that dselect created, allupgrade cannot handle
- such things. We do so quite agressively too.. */
+ such things. We do so quite aggressively too.. */
if (Cache->BrokenCount() != 0)
{
pkgProblemResolver Fix(Cache);
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index 53b38ea43..bf5b8c1fe 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -160,16 +160,16 @@ int main(int argc,const char *argv[]) /*{{{*/
if (upgrade == true) {
if (pkgAllUpgrade(CacheFile) == false) {
- EDSP::WriteError("ERR_UNSOLVABLE_UPGRADE", "An upgrade error occured", output);
+ EDSP::WriteError("ERR_UNSOLVABLE_UPGRADE", "An upgrade error occurred", output);
return 0;
}
} else if (distUpgrade == true) {
if (pkgDistUpgrade(CacheFile) == false) {
- EDSP::WriteError("ERR_UNSOLVABLE_DIST_UPGRADE", "An dist-upgrade error occured", output);
+ EDSP::WriteError("ERR_UNSOLVABLE_DIST_UPGRADE", "An dist-upgrade error occurred", output);
return 0;
}
} else if (Fix.Resolve() == false) {
- EDSP::WriteError("ERR_UNSOLVABLE", "An error occured", output);
+ EDSP::WriteError("ERR_UNSOLVABLE", "An error occurred", output);
return 0;
}
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index 0ced500db..0774cf4b7 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -18,7 +18,7 @@ touch $SECRETKEYRING
GPG_CMD="$GPG_CMD --homedir $GPGHOMEDIR"
# create the trustdb with an (empty) dummy keyring
# older gpgs required it, newer gpgs even warn that it isn't needed,
-# but require it nontheless for some commands, so we just play safe
+# but require it nonetheless for some commands, so we just play safe
# here for the foreseeable future and create a dummy one
$GPG_CMD --quiet --check-trustdb --keyring $SECRETKEYRING >/dev/null 2>&1
# tell gpg that it shouldn't try to maintain a trustdb file
@@ -187,7 +187,7 @@ remove_key_from_keyring() {
echo >&2 "Key ${2} is in keyring ${1}, but can't be removed as it is read only."
return
fi
- # check if it is the only key in the keyring and if so remove the keyring alltogether
+ # check if it is the only key in the keyring and if so remove the keyring altogether
if [ '1' = "$($GPG --with-colons --list-keys | grep "^pub:[^:]*:[^:]*:[^:]*:[0-9A-F]\+:" | wc -l)" ]; then
mv -f "$1" "${1}~" # behave like gpg
return
diff --git a/cmdline/makefile b/cmdline/makefile
index 06f170b6a..f89192e10 100644
--- a/cmdline/makefile
+++ b/cmdline/makefile
@@ -40,20 +40,6 @@ LIB_MAKES = apt-pkg/makefile
SOURCE = apt-cdrom.cc
include $(PROGRAM_H)
-# The apt-key program
-apt-key: apt-key.in
- sed -e "s#&keyring-filename;#$(shell ../vendor/getinfo keyring-filename)#" \
- -e "s#&keyring-removed-filename;#$(shell ../vendor/getinfo keyring-removed-filename)#" \
- -e "s#&keyring-master-filename;#$(shell ../vendor/getinfo keyring-master-filename)#" \
- -e "s#&keyring-uri;#$(shell ../vendor/getinfo keyring-uri)#" \
- -e "s#&keyring-package;#$(shell ../vendor/getinfo keyring-package)#" $< > $@
- chmod 755 $@
-
-SOURCE=apt-key
-TO=$(BIN)
-TARGET=program
-include $(COPY_H)
-
# The apt-mark program
PROGRAM=apt-mark
SLIBS = -lapt-pkg -lapt-private $(INTLLIBS)
@@ -99,3 +85,22 @@ SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = apt-dump-solver.cc
include $(PROGRAM_H)
+
+# The apt-key program
+apt-key: apt-key.in
+ sed -e "s#&keyring-filename;#$(shell ../vendor/getinfo keyring-filename)#" \
+ -e "s#&keyring-removed-filename;#$(shell ../vendor/getinfo keyring-removed-filename)#" \
+ -e "s#&keyring-master-filename;#$(shell ../vendor/getinfo keyring-master-filename)#" \
+ -e "s#&keyring-uri;#$(shell ../vendor/getinfo keyring-uri)#" \
+ -e "s#&keyring-package;#$(shell ../vendor/getinfo keyring-package)#" $< > $@
+ chmod 755 $@
+
+SOURCE=apt-key
+TO=$(BIN)
+TARGET=program
+include $(COPY_H)
+
+clean: clean/apt-key
+
+clean/apt-key:
+ rm -f apt-key