From 46a78c652d80818b4643c471432ae961b1ca5bd9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 22 Feb 2014 18:07:43 +0100 Subject: remove auto-generated apt-key and sources.list on clean (closes: 739749) --- cmdline/makefile | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'cmdline') 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 -- cgit v1.2.3 From 1e3f4083db29bba600b9725e9456b0e140975c99 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 22 Feb 2014 18:34:33 +0100 Subject: Fix typos in documentation (codespell) --- cmdline/apt-config.cc | 2 +- cmdline/apt-get.cc | 4 ++-- cmdline/apt-internal-solver.cc | 6 +++--- cmdline/apt-key.in | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'cmdline') 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-get.cc b/cmdline/apt-get.cc index 4d609104c..12e385b69 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 -- cgit v1.2.3 From e7f56293f029505f59670be2bad244f6d9912369 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 16 Feb 2014 23:30:48 +0100 Subject: Add support for data.tar, control.tar and control.tar.xz Sync the deb(5) format support with latest dpkg, by allowing uncompressed tar members and xz compressed control.tar. This also refactors the control.tar member extraction by using ExtractTarMember(), which also means future changes only need to be implemented in a single place. --- cmdline/apt-extracttemplates.cc | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'cmdline') 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 #include #include -#include -#include +#include #include #include #include @@ -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 /*{{{*/ -- cgit v1.2.3