From 9179f697ed4796a86f820b516f034fd679e48be4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 22 Mar 2012 00:16:11 +0100 Subject: the previously used VERSION didn't work everywhere so we are switching to the more standard PACKAGE_VERSION and make it work in every file --- apt-pkg/init.cc | 2 +- buildlib/config.h.in | 6 +++--- buildlib/environment.mak.in | 1 + cmdline/apt-cache.cc | 2 +- cmdline/apt-cdrom.cc | 2 +- cmdline/apt-config.cc | 2 +- cmdline/apt-dump-solver.cc | 2 +- cmdline/apt-extracttemplates.cc | 2 +- cmdline/apt-get.cc | 2 +- cmdline/apt-internal-solver.cc | 2 +- cmdline/apt-mark.cc | 2 +- cmdline/apt-sortpkgs.cc | 2 +- configure.in | 7 ++++--- debian/rules | 2 +- doc/Doxyfile.in | 2 +- doc/makefile | 3 --- ftparchive/apt-ftparchive.cc | 2 +- methods/http.cc | 2 +- methods/https.cc | 2 +- po/makefile | 2 +- 20 files changed, 24 insertions(+), 25 deletions(-) diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index a1c47c030..76278921f 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -24,7 +24,7 @@ #define Stringfy_(x) # x #define Stringfy(x) Stringfy_(x) -const char *pkgVersion = VERSION; +const char *pkgVersion = PACKAGE_VERSION; const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "." Stringfy(APT_PKG_MINOR) "." Stringfy(APT_PKG_RELEASE); diff --git a/buildlib/config.h.in b/buildlib/config.h.in index 4798fe3f5..87918bbec 100644 --- a/buildlib/config.h.in +++ b/buildlib/config.h.in @@ -39,10 +39,10 @@ /* Define the arch name string */ #undef COMMON_ARCH -/* The version number string */ -#undef VERSION - /* The package name string */ #undef PACKAGE +/* The version number string */ +#undef PACKAGE_VERSION + #define APT_8_CLEANER_HEADERS diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in index fdac3e6c3..b8ddb34a2 100644 --- a/buildlib/environment.mak.in +++ b/buildlib/environment.mak.in @@ -2,6 +2,7 @@ # if you want you can edit it, just don't re-run configure. PACKAGE = @PACKAGE@ +PACKAGE_VERSION = @PACKAGE_VERSION@ # C++ compiler options CC = @CC@ diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 94654ffd4..ce869581b 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1676,7 +1676,7 @@ bool GenCaches(CommandLine &Cmd) /* */ bool ShowHelp(CommandLine &Cmd) { - ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 0017d954e..2551f4916 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -195,7 +195,7 @@ bool DoIdent(CommandLine &) /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 47bedfe3f..79ae944df 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -72,7 +72,7 @@ bool DoDump(CommandLine &CmdL) /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc index e82e15c6e..aa16b1271 100644 --- a/cmdline/apt-dump-solver.cc +++ b/cmdline/apt-dump-solver.cc @@ -21,7 +21,7 @@ bool ShowHelp() { std::cout << - PACKAGE " " VERSION " for " COMMON_ARCH " compiled on " __DATE__ " " __TIME__ << std::endl << + PACKAGE " " PACKAGE_VERSION " for " COMMON_ARCH " compiled on " __DATE__ " " __TIME__ << std::endl << "Usage: apt-dump-resolver\n" "\n" "apt-dump-resolver is a dummy solver who just dumps its input to the\n" diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index dc4c110a1..60efafba5 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -224,7 +224,7 @@ bool DebFile::ParseInfo() /* */ int ShowHelp(void) { - ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index f4ad75d1c..ac1566f30 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -3295,7 +3295,7 @@ bool DoMoo(CommandLine &CmdL) /* */ bool ShowHelp(CommandLine &CmdL) { - ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc index 1b636e4d5..25ecb7af1 100644 --- a/cmdline/apt-internal-solver.cc +++ b/cmdline/apt-internal-solver.cc @@ -29,7 +29,7 @@ // --------------------------------------------------------------------- /* */ bool ShowHelp(CommandLine &CmdL) { - ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); std::cout << diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc index ef4331714..2d5eed29d 100644 --- a/cmdline/apt-mark.cc +++ b/cmdline/apt-mark.cc @@ -360,7 +360,7 @@ bool ShowHold(CommandLine &CmdL) /* */ bool ShowHelp(CommandLine &CmdL) { - ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); cout << diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 20ae14f2a..46989044e 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -144,7 +144,7 @@ bool DoIt(string InFile) /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff --git a/configure.in b/configure.in index 065afccf1..78ad06b72 100644 --- a/configure.in +++ b/configure.in @@ -17,11 +17,12 @@ AC_INIT(configure.in) AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) -dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.8.16~exp9") PACKAGE="apt" +PACKAGE_VERSION="0.8.16~exp14" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") +AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"$PACKAGE_VERSION") AC_SUBST(PACKAGE) +AC_SUBST(PACKAGE_VERSION) dnl Check the archs, we want the target type. AC_CANONICAL_SYSTEM @@ -218,4 +219,4 @@ fi AC_SUBST(USE_NLS) AC_PATH_PROG(BASH, bash) -AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in doc/Doxyfile,make -s dirs) +AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in doc/Doxyfile:doc/Doxyfile.in,make -s dirs) diff --git a/debian/rules b/debian/rules index 9eda3a8fa..00e6bd4b7 100755 --- a/debian/rules +++ b/debian/rules @@ -35,7 +35,7 @@ build: PKG=apt DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS) APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p' | sed -e 's/\+.*$$//') -APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in) +APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"\(.*\)")/\1/p' configure.in) APT_CVSTAG=$(shell echo "$(APT_DEBVER)" | sed -e 's/^/v/' -e 's/\./_/g') # Determine the build directory to use diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 43d961443..cf79aff85 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -31,7 +31,7 @@ PROJECT_NAME = @PACKAGE@ # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = @VERSION@ +PROJECT_NUMBER = @PACKAGE_VERSION@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/doc/makefile b/doc/makefile index fca0bfa0d..0817821b6 100644 --- a/doc/makefile +++ b/doc/makefile @@ -91,9 +91,6 @@ doxygen-clean: rm -fr $(BUILD)/doc/doxygen rm -f $(BUILD)/doc/doxygen-stamp -$(BUILD)/doc/Doxyfile: Doxyfile.in - (cd $(BUILD) && ./config.status doc/Doxyfile) - $(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile rm -fr $(BUILD)/doc/doxygen mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799 diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index f289eb00d..4efbecc8c 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -587,7 +587,7 @@ void LoadBinDir(vector &PkgList,Configuration &Setup) /* */ bool ShowHelp(CommandLine &CmdL) { - ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return true; diff --git a/methods/http.cc b/methods/http.cc index d2e03cfbc..c62ca71d3 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -758,7 +758,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out) Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n"; } Req += "User-Agent: " + _config->Find("Acquire::http::User-Agent", - "Debian APT-HTTP/1.3 ("VERSION")") + "\r\n\r\n"; + "Debian APT-HTTP/1.3 ("PACKAGE_VERSION")") + "\r\n\r\n"; if (Debug == true) cerr << Req << endl; diff --git a/methods/https.cc b/methods/https.cc index 4f2d581d2..fac7ba790 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -219,7 +219,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_USERAGENT, _config->Find("Acquire::https::User-Agent", _config->Find("Acquire::http::User-Agent", - "Debian APT-CURL/1.0 ("VERSION")").c_str()).c_str()); + "Debian APT-CURL/1.0 ("PACKAGE_VERSION")").c_str()).c_str()); // set timeout int const timeout = _config->FindI("Acquire::https::Timeout", diff --git a/po/makefile b/po/makefile index 6a2bc416d..46b75ff4f 100644 --- a/po/makefile +++ b/po/makefile @@ -70,7 +70,7 @@ $(PACKAGE)-all.pot: $(POTFILES) # but we want a header for our master-pot file, so we use a dummy pot with nothing but the header $(XGETTEXT) --default-domain=$(PO)/$(PACKAGE)-dummy.pot --foreign --language=c \ -o $(PO)/$(PACKAGE)-dummy.pot --force-po --package-name=$(PACKAGE) \ - --package-version=$(VERSION) --msgid-bugs-address=deity@lists.debian.org /dev/null + --package-version=$(PACKAGE_VERSION) --msgid-bugs-address=deity@lists.debian.org /dev/null $(MSGCOMM) --more-than=0 $(PO)/$(PACKAGE)-dummy.pot $(POTFILES) --output=$(PACKAGE)-all.pot rm -f $(PO)/$(PACKAGE)-dummy.pot -- cgit v1.2.3