From: David Kalnischkies Date: Thu, 6 May 2010 14:15:53 +0000 (+0200) Subject: merge with debian-experimental-ma X-Git-Tag: 0.8.0~9^2~46^2~14 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/d1aa91622b3e0f7653889cab205e4c5c622162f4?ds=inline;hp=-c merge with debian-experimental-ma --- d1aa91622b3e0f7653889cab205e4c5c622162f4 diff --combined cmdline/apt-get.cc index de8c7aeaf,03239dabe..00da0855f --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@@ -1315,6 -1315,10 +1315,10 @@@ pkgSrcRecords::Parser *FindSrc(const ch break; fuzzy = true; Ver = Pkg.VersionList(); + // exit right away from the Pkg.VersionList() loop if we + // don't have any versions + if (Ver.end() == true) + break; } // We match against a concrete version (or a part of this version) if (VerTag.empty() == false && @@@ -1932,10 -1936,9 +1936,10 @@@ bool DoInstall(CommandLine &CmdL { /* Skip if package is installed already, or is about to be */ string target = Start.TargetPkg().FullName(true) + " "; - - if ((*Start.TargetPkg()).SelectedState == pkgCache::State::Install - || Cache[Start.TargetPkg()].Install()) + pkgCache::PkgIterator const TarPkg = Start.TargetPkg(); + if (TarPkg->SelectedState == pkgCache::State::Install || - TarPkg->SelectedState == pkgCache::State::Hold || ++ TarPkg->SelectedState == pkgCache::State::Hold || + Cache[Start.TargetPkg()].Install()) { foundInstalledInOrGroup=true; break; @@@ -2010,6 -2013,46 +2014,46 @@@ return InstallPackages(Cache,false); } + + /* mark packages as automatically/manually installed. */ + bool DoMarkAuto(CommandLine &CmdL) + { + bool Action = true; + int AutoMarkChanged = 0; + OpTextProgress progress; + CacheFile Cache; + if (Cache.Open() == false) + return false; + + if (strcasecmp(CmdL.FileList[0],"markauto") == 0) + Action = true; + else if (strcasecmp(CmdL.FileList[0],"unmarkauto") == 0) + Action = false; + + for (const char **I = CmdL.FileList + 1; *I != 0; I++) + { + const char *S = *I; + // Locate the package + pkgCache::PkgIterator Pkg = Cache->FindPkg(S); + if (Pkg.end() == true) { + return _error->Error(_("Couldn't find package %s"),S); + } + else + { + if (!Action) + ioprintf(c1out,_("%s set to manually installed.\n"), Pkg.Name()); + else + ioprintf(c1out,_("%s set to automatically installed.\n"), + Pkg.Name()); + + Cache->MarkAuto(Pkg,Action); + AutoMarkChanged++; + } + } + if (AutoMarkChanged && ! _config->FindB("APT::Get::Simulate",false)) + return Cache->writeStateFile(NULL); + return false; + } /*}}}*/ // DoDistUpgrade - Automatic smart upgrader /*{{{*/ // --------------------------------------------------------------------- @@@ -2381,7 -2424,6 +2425,7 @@@ bool DoSource(CommandLine &CmdL if (Process == 0) { + bool const fixBroken = _config->FindB("APT::Get::Fix-Broken", false); for (unsigned I = 0; I != J; I++) { string Dir = Dsc[I].Package + '-' + Cache->VS().UpstreamVersion(Dsc[I].Version.c_str()); @@@ -2394,7 -2436,7 +2438,7 @@@ // See if the package is already unpacked struct stat Stat; - if (stat(Dir.c_str(),&Stat) == 0 && + if (fixBroken == false && stat(Dir.c_str(),&Stat) == 0 && S_ISDIR(Stat.st_mode) != 0) { ioprintf(c0out ,_("Skipping unpack of already unpacked source in %s\n"), @@@ -2796,6 -2838,8 +2840,8 @@@ bool ShowHelp(CommandLine &CmdL " clean - Erase downloaded archive files\n" " autoclean - Erase old downloaded archive files\n" " check - Verify that there are no broken dependencies\n" + " markauto - Mark the given packages as automatically installed\n" + " unmarkauto - Mark the given packages as manually installed\n" "\n" "Options:\n" " -h This help text.\n" @@@ -2902,6 -2946,8 +2948,8 @@@ int main(int argc,const char *argv[] {"purge",&DoInstall}, {"autoremove",&DoInstall}, {"purge",&DoInstall}, + {"markauto",&DoMarkAuto}, + {"unmarkauto",&DoMarkAuto}, {"dist-upgrade",&DoDistUpgrade}, {"dselect-upgrade",&DoDSelectUpgrade}, {"build-dep",&DoBuildDep}, diff --combined debian/changelog index 144d307fa,004a890e1..43f76a18e --- a/debian/changelog +++ b/debian/changelog @@@ -1,20 -1,9 +1,31 @@@ - apt (0.7.26~exp4) UNRELEASED; urgency=low ++apt (0.7.26~exp5) UNRELEASED; urgency=low + - [ Michael Vogt ] - * [ Abi break ] apt-pkg/acquire-item.{cc,h}: - - add "IsIndexFile" to constructor of pkgAcqFile so that it sends - the right cache control headers - * apt-pkg/depcache.cc: - - fix incorrect std::cout usage for debug output - * test/libapt/getlanguages_test.cc: - - Add test for Esperanto that has nocounty associated with them - (LP: #560956) ++ [ David Kalnischkies ] ++ * cmdline/apt-get.cc: ++ - rerun dpkg-source in source if --fix-broken is given (Closes: #576752) ++ - don't suggest held packages as they are installed (Closes: #578135) ++ * cmdline/apt-cache.cc: ++ - use GroupCount for package names in stats and add a package struct line ++ * methods/rred.cc: ++ - use the patchfile modification time instead of the one from the ++ "old" file - thanks to Philipp Weis for noticing! (Closes: #571541) ++ * debian/rules: ++ - remove targets refering to CVS or arch as they are useless ++ ++ [ Jari Aalto ] ++ * debian/rules: ++ - spell out some less known options to reduce manpage consulation-rate ++ - Use POSIX command substitution: $() ++ - Remove EOL whitespace (Closes: #577804) ++ ++ -- David Kalnischkies Thu, 06 May 2010 16:10:39 +0200 ++ + apt (0.7.26~exp4) experimental; urgency=low [ David Kalnischkies ] * apt-pkg/depcache.cc: - rewrite the pseudo package reinstaller to be more intelligent in his package choices - - return in SingleArch a package also for "any" * apt-pkg/packagemanager.cc: - don't try to "unpack" pseudo packages twice * apt-pkg/contrib/fileutl.cc: @@@ -33,8 -22,6 +44,6 @@@ - regex for package names executed on Grp- not PkgIterator - show non-candidates as fallback for virtual packages (Closes: #578385) - set also "all" to this version for pseudo packages in TryToChangeVer - - rerun dpkg-source in source if --fix-broken is given (Closes: #576752) - - don't suggest held packages as they are installed (Closes: #578135) * apt-pkg/deb/dpkgpm.cc: - remove Chroot-Directory from files passed to install commands. Thanks to Kel Modderman for report & patch! (Closes: #577226) @@@ -43,7 -30,6 +52,6 @@@ * cmdline/apt-cache.cc: - align Installed and Candidate Version in policy so they can be compared easier, thanks Ralf Gesellensetter for the pointer! (Closes: #578657) - - use GroupCount for package names in stats and add a package struct line * doc/apt.ent: - Add a note about APT_CONFIG in the -c description (Closes: #578267) * doc/po/de.po: @@@ -60,11 -46,6 +68,6 @@@ * apt-pkg/pkgcache.h: - enhance the Groups ABI by providing a ID as the other structs does - check also the size of the Group struct then checking for the others - * methods/rred.cc: - - use the patchfile modification time instead of the one from the - "old" file - thanks to Philipp Weis for noticing! (Closes: #571541) - * debian/rules: - - remove targets refering to CVS or arch as they are useless [ Jari Aalto ] * cmdline/apt-get.cc: @@@ -73,12 -54,39 +76,39 @@@ * dselect/install: - modernize if-statements not to use 'x' (Closes: #577117) - replace backticks with POSIX $() (Closes: #577116) + + [ Michael Vogt ] + * [ Abi break ] apt-pkg/acquire-item.{cc,h}: + - add "IsIndexFile" to constructor of pkgAcqFile so that it sends + the right cache control headers + * cmdline/apt-get.cc: + - fix crash when pkg.VersionList() is empty + * apt-pkg/depcache.cc: + - fix incorrect std::cout usage for debug output + * test/libapt/getlanguages_test.cc: + - Add test for Esperanto that has nocounty associated with them + (LP: #560956) + * apt-pkg/deb/debrecords.cc: + - fix max tag buffer size (LP: #545336, closes: #578959) * debian/rules: - - spell out some less known options to reduce manpage consulation-rate - - Use POSIX command substitution: $() - - Remove EOL whitespace (Closes: #577804) + - install html doxygen in libapt-pkg-doc + * debian/control: + - build-depend on doxygen + + [ Julian Andres Klode ] + * apt-pkg/contrib/weakptr.h: + - add a class WeakPointable which allows one to register weak pointers to + an object which will be set to NULL when the object is deallocated. + * [ABI break] apt-pkg/acquire{-worker,-item,}.h: + - subclass pkgAcquire::{Worker,Item,ItemDesc} from WeakPointable. + * apt-pkg/pkgcache.cc: + - Merge fix from David to correct handling in single-arch environments. + * cmdline/apt-cache.cc: + - Add a showauto command to apt-cache. + * cmdline/apt-get.cc: + - Add apt-get markauto and unmarkauto commands. - -- David Kalnischkies Sat, 03 Apr 2010 14:58:39 +0200 + -- Michael Vogt Thu, 06 May 2010 09:32:54 +0200 apt (0.7.26~exp3) experimental; urgency=low @@@ -1584,13 -1592,6 +1614,6 @@@ apt (0.7.6) unstable; urgency=lo -- Otavio Salvador Wed, 01 Aug 2007 19:49:51 -0300 - apt (0.7.6) unstable; urgency=low - - * Applied patch from Aurelien Jarno to fix wrong - directory downloading on non-linux architectures (closes: #435597) - - -- Otavio Salvador Wed, 01 Aug 2007 19:49:51 -0300 - apt (0.7.5) unstable; urgency=low [ Otavio Salvador ] diff --combined debian/rules index bb2cc34c3,f901ea749..cb4622779 --- a/debian/rules +++ b/debian/rules @@@ -47,7 -47,7 +47,7 @@@ BASE= ifdef BUILD BUILD_POSSIBLE := $(BUILD) $(BASE)/$(BUILD) else -BUILD_POSSIBLE := $(BASE) $(BASE)/build-$(shell uname -m) $(BASE)/build +BUILD_POSSIBLE := $(BASE) $(BASE)/build-$(shell uname --machine) $(BASE)/build endif BUILDX:= $(foreach i,$(BUILD_POSSIBLE),$(wildcard $(i)/environment.mak*)) BUILDX:= $(patsubst %/,%,$(firstword $(dir $(BUILDX)))) @@@ -82,9 -82,9 +82,9 @@@ LIBAPTPKG_PROVIDE=libapt-pkg$(LIBAPTPKG LIBAPTINST_PROVIDE=libapt-inst$(LIBAPTINST_MAJOR) debian/shlibs.local: apt-pkg/makefile - # We have 3 shlibs.local files.. One for 'apt', one for 'apt-utils' and + # We have 3 shlibs.local files: One for 'apt', one for 'apt-utils' and # one for the rest of the packages. This ensures that each package gets - # the right overrides.. + # the right overrides… rm -rf $@ $@.apt $@.apt-utils echo "libapt-pkg $(LIBAPTPKG_MAJOR)" > $@.apt @@@ -94,8 -94,8 +94,8 @@@ echo "libapt-pkg $(LIBAPTPKG_MAJOR) $(LIBAPTPKG_PROVIDE)" > $@ echo "libapt-inst $(LIBAPTINST_MAJOR) $(LIBAPTINST_PROVIDE)" >> $@ -build: build/build-stamp -build-doc: build/build-doc-stamp +build: build/build-stamp +build-doc: build/build-doc-stamp # Note that this is unconditionally done first as part of loading environment.mak # The true is needed to force make to reload environment.mak after running @@@ -123,8 -123,10 +123,8 @@@ build/build-doc-stamp: build/configure- clean: dh_testdir -# dh_testroot - [ -f Makefile ] && $(MAKE) clean - [ -f Makefile ] && $(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) clean distclean rm -rf build # Add here commands to clean up after the build process. @@@ -139,19 -141,23 +139,20 @@@ libapt-pkg-doc: build-doc debian/shlibs dh_installdirs -p$@ # # libapt-pkg-doc install -# - dh_installdocs -p$@ $(BLD)/docs/design* $(BLD)/docs/dpkg-tech* \ - $(BLD)/docs/files* $(BLD)/docs/method* \ - doc/libapt-pkg2_to_3.txt doc/style.txt \ +# + dh_installdocs -p$@ $(BLD)/docs/design* \ + $(BLD)/docs/dpkg-tech* \ + $(BLD)/docs/files* \ + $(BLD)/docs/method* \ + doc/libapt-pkg2_to_3.txt \ - doc/style.txt ++ doc/style.txt \ + $(BLD)/doc/doxygen/html dh_installexamples -p$@ -# dh_installmenu -p$@ -# dh_installinit -p$@ -# dh_installcron -p$@ -# dh_installman -p$@ -# dh_undocumented -p$@ dh_installchangelogs -p$@ dh_strip -p$@ dh_compress -p$@ dh_fixperms -p$@ -# dh_suidregister -p$@ dh_installdeb -p$@ dh_gencontrol -p$@ -u -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE) dh_md5sums -p$@ @@@ -165,10 -171,8 +166,10 @@@ apt-doc: build-do # apt-doc install # # Copy the guides - dh_installdocs -p$@ $(BLD)/docs/guide*.text $(BLD)/docs/guide*.html \ - $(BLD)/docs/offline*.text $(BLD)/docs/offline*.html + dh_installdocs -p$@ $(BLD)/docs/guide*.text \ + $(BLD)/docs/guide*.html \ + $(BLD)/docs/offline*.text \ + $(BLD)/docs/offline*.html dh_installchangelogs -p$@ dh_compress -p$@ dh_fixperms -p$@ @@@ -211,6 -215,7 +212,6 @@@ apt: build build-doc debian/shlibs.loca cp debian/apt.logrotate debian/$@/etc/logrotate.d/apt cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove -# head -n 500 ChangeLog > debian/ChangeLog # copy lintian override cp share/lintian-overrides debian/$@/usr/share/lintian/overrides/apt @@@ -228,9 -233,9 +229,9 @@@ dh_strip -p$@ dh_compress -p$@ dh_fixperms -p$@ - dh_makeshlibs -p$@ -m$(LIBAPTPKG_MAJOR) -V '$(LIBAPTPKG_PROVIDE)' + dh_makeshlibs -p$@ --major=$(LIBAPTPKG_MAJOR) --version-info='$(LIBAPTPKG_PROVIDE)' dh_installdeb -p$@ - dh_shlibdeps -p$@ -l`pwd`/debian/apt/usr/lib:`pwd`/debian/$@/usr/lib -- -Ldebian/shlibs.local.apt + dh_shlibdeps -p$@ -l$(pwd)/debian/apt/usr/lib:$(pwd)/debian/$@/usr/lib -- -Ldebian/shlibs.local.apt dh_gencontrol -p$@ -u -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE) dh_md5sums -p$@ dh_builddeb -p$@ @@@ -249,11 -254,16 +250,11 @@@ libapt-pkg-dev: build debian/shlibs.loc cp $(BLD)/include/apt-pkg/*.h debian/libapt-pkg-dev/usr/include/apt-pkg/ dh_installdocs -p$@ -# dh_installmenu -p$@ -# dh_installinit -p$@ -# dh_installcron -p$@ -# dh_installman -p$@ dh_installchangelogs -p$@ dh_strip -p$@ dh_compress -p$@ dh_fixperms -p$@ -# dh_suidregister -p$@ dh_installdeb -p$@ dh_gencontrol -p$@ -u -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE) -Vlibapt-inst:provides=$(LIBAPTINST_PROVIDE) dh_md5sums -p$@ @@@ -281,9 -291,9 +282,9 @@@ apt-utils: build debian/shlibs.loca dh_strip -p$@ dh_compress -p$@ dh_fixperms -p$@ - dh_makeshlibs -m$(LIBAPTINST_MAJOR) -V '$(LIBAPTINST_PROVIDE)' -p$@ + dh_makeshlibs -p$@ --major=$(LIBAPTINST_MAJOR) --version-info='$(LIBAPTINST_PROVIDE)' dh_installdeb -p$@ - dh_shlibdeps -p$@ -l`pwd`/debian/apt/usr/lib:`pwd`/debian/$@/usr/lib -- -Ldebian/shlibs.local.apt-utils + dh_shlibdeps -p$@ -l$(pwd)/debian/apt/usr/lib:$(pwd)/debian/$@/usr/lib -- -Ldebian/shlibs.local.apt-utils dh_gencontrol -p$@ -u -Vlibapt-inst:provides=$(LIBAPTINST_PROVIDE) dh_md5sums -p$@ dh_builddeb -p$@ @@@ -295,7 -305,7 +296,7 @@@ apt-transport-https: build debian/shlib dh_installdirs -p$@ # install the method - mkdir -p debian/$@/usr/lib/apt/methods + mkdir --parents debian/$@/usr/lib/apt/methods cp $(BLD)/bin/methods/https debian/$@/usr/lib/apt/methods dh_installdocs -p$@ debian/apt-transport-https.README @@@ -309,18 -319,61 +310,18 @@@ dh_compress -p$@ dh_fixperms -p$@ dh_installdeb -p$@ - dh_shlibdeps -p$@ -l`pwd`/debian/apt/usr/lib:`pwd`/debian/$@/usr/lib + dh_shlibdeps -p$@ -l$(pwd)/debian/apt/usr/lib:$(pwd)/debian/$@/usr/lib dh_gencontrol -p$@ dh_md5sums -p$@ dh_builddeb -p$@ -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - -# Update from CVS -l33ch: really-clean - cvs update - buildlib/mkChangeLog - -# Update from CVS and then configure for build -super-l33ch: l33ch Makefile.in - configure: $(MAKE) configure -l33ch-stamp: super-l33ch - touch $@ - really-clean: clean - -find -name Makefile.in -print0 | xargs -0r rm -f + -find . -name Makefile.in -print0 | xargs --null --no-run-if-empty -- rm -f find -name ChangeLog | xargs rm -f rm -f l33ch-stamp binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary debian/shlibs.local - - -# Done by the uploader. -#cvs update.. -#edit debian/changelog -# configure.in has the version automatically updated now. -# edit configure.in -# debian/rules cvs-build - -CVS_BUILDDIR=apt-$(APT_DEBVER) -CVS_ROOT=$(shell cat CVS/Root) -CVS_MODULE=$(shell cat CVS/Repository) -cvs-build: - rm -rf debian/cvs-build - mkdir -p debian/cvs-build - (cd debian/cvs-build;cvs -d $(CVS_ROOT) export -r$(APT_CVSTAG) -d apt-$(APT_DEBVER) $(CVS_MODULE)) - $(MAKE) -C debian/cvs-build/$(CVS_BUILDDIR) startup doc - (cd debian/cvs-build/$(CVS_BUILDDIR);$(DEB_BUILD_PROG)) - -cvs-mkul: - -mkdir -p ../upload-$(APT_DEBVER) - cp `find debian/cvs-build -maxdepth 1 -type f` ../upload-$(APT_DEBVER) - -arch-build: - rm -rf debian/arch-build - mkdir -p debian/arch-build/apt-$(APT_DEBVER) - tar -c --exclude=arch-build --no-recursion -f - `bzr inventory` | (cd debian/arch-build/$(PKG)-$(APT_DEBVER);tar xf -) - $(MAKE) -C debian/arch-build/apt-$(APT_DEBVER) startup doc - (cd debian/arch-build/apt-$(APT_DEBVER); $(DEB_BUILD_PROG); dpkg-genchanges -S > ../apt_$(APT_DEBVER)_source.changes)