Parcourir la source

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

David Kalnischkies il y a 14 ans
Parent
commit
9179f697ed

+ 1 - 1
apt-pkg/init.cc

@@ -24,7 +24,7 @@
 
 
 #define Stringfy_(x) # x
 #define Stringfy_(x) # x
 #define Stringfy(x)  Stringfy_(x)
 #define Stringfy(x)  Stringfy_(x)
-const char *pkgVersion = VERSION;
+const char *pkgVersion = PACKAGE_VERSION;
 const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "."
 const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "."
                             Stringfy(APT_PKG_MINOR) "." 
                             Stringfy(APT_PKG_MINOR) "." 
                             Stringfy(APT_PKG_RELEASE);
                             Stringfy(APT_PKG_RELEASE);

+ 3 - 3
buildlib/config.h.in

@@ -39,10 +39,10 @@
 /* Define the arch name string */
 /* Define the arch name string */
 #undef COMMON_ARCH
 #undef COMMON_ARCH
 
 
-/* The version number string */
-#undef VERSION
-
 /* The package name string */
 /* The package name string */
 #undef PACKAGE
 #undef PACKAGE
 
 
+/* The version number string */
+#undef PACKAGE_VERSION
+
 #define APT_8_CLEANER_HEADERS
 #define APT_8_CLEANER_HEADERS

+ 1 - 0
buildlib/environment.mak.in

@@ -2,6 +2,7 @@
 # if you want you can edit it, just don't re-run configure.
 # if you want you can edit it, just don't re-run configure.
 
 
 PACKAGE = @PACKAGE@
 PACKAGE = @PACKAGE@
+PACKAGE_VERSION = @PACKAGE_VERSION@
 
 
 # C++ compiler options
 # C++ compiler options
 CC = @CC@
 CC = @CC@

+ 1 - 1
cmdline/apt-cache.cc

@@ -1676,7 +1676,7 @@ bool GenCaches(CommandLine &Cmd)
 /* */
 /* */
 bool ShowHelp(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__);
 	    COMMON_ARCH,__DATE__,__TIME__);
    
    
    if (_config->FindB("version") == true)
    if (_config->FindB("version") == true)

+ 1 - 1
cmdline/apt-cdrom.cc

@@ -195,7 +195,7 @@ bool DoIdent(CommandLine &)
 /* */
 /* */
 int ShowHelp()
 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__);
 	    COMMON_ARCH,__DATE__,__TIME__);
    if (_config->FindB("version") == true)
    if (_config->FindB("version") == true)
       return 0;
       return 0;

+ 1 - 1
cmdline/apt-config.cc

@@ -72,7 +72,7 @@ bool DoDump(CommandLine &CmdL)
 /* */
 /* */
 int ShowHelp()
 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__);
 	    COMMON_ARCH,__DATE__,__TIME__);
    if (_config->FindB("version") == true)
    if (_config->FindB("version") == true)
       return 0;
       return 0;

+ 1 - 1
cmdline/apt-dump-solver.cc

@@ -21,7 +21,7 @@
 bool ShowHelp() {
 bool ShowHelp() {
 
 
 	std::cout <<
 	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"
 		"Usage: apt-dump-resolver\n"
 		"\n"
 		"\n"
 		"apt-dump-resolver is a dummy solver who just dumps its input to the\n"
 		"apt-dump-resolver is a dummy solver who just dumps its input to the\n"

+ 1 - 1
cmdline/apt-extracttemplates.cc

@@ -224,7 +224,7 @@ bool DebFile::ParseInfo()
 /* */
 /* */
 int ShowHelp(void)
 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__);
 	    COMMON_ARCH,__DATE__,__TIME__);
 
 
 	if (_config->FindB("version") == true) 
 	if (_config->FindB("version") == true) 

+ 1 - 1
cmdline/apt-get.cc

@@ -3295,7 +3295,7 @@ bool DoMoo(CommandLine &CmdL)
 /* */
 /* */
 bool ShowHelp(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__);
 	    COMMON_ARCH,__DATE__,__TIME__);
 	    
 	    
    if (_config->FindB("version") == true)
    if (_config->FindB("version") == true)

+ 1 - 1
cmdline/apt-internal-solver.cc

@@ -29,7 +29,7 @@
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
 bool ShowHelp(CommandLine &CmdL) {
 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__);
 		 COMMON_ARCH,__DATE__,__TIME__);
 
 
 	std::cout <<
 	std::cout <<

+ 1 - 1
cmdline/apt-mark.cc

@@ -360,7 +360,7 @@ bool ShowHold(CommandLine &CmdL)
 /* */
 /* */
 bool ShowHelp(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__);
 	    COMMON_ARCH,__DATE__,__TIME__);
 
 
    cout <<
    cout <<

+ 1 - 1
cmdline/apt-sortpkgs.cc

@@ -144,7 +144,7 @@ bool DoIt(string InFile)
 /* */
 /* */
 int ShowHelp()
 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__);
 	    COMMON_ARCH,__DATE__,__TIME__);
    if (_config->FindB("version") == true)
    if (_config->FindB("version") == true)
       return 0;
       return 0;

+ 4 - 3
configure.in

@@ -17,11 +17,12 @@ AC_INIT(configure.in)
 AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 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="apt"
+PACKAGE_VERSION="0.8.16~exp14"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
+AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"$PACKAGE_VERSION")
 AC_SUBST(PACKAGE)
 AC_SUBST(PACKAGE)
+AC_SUBST(PACKAGE_VERSION)
 
 
 dnl Check the archs, we want the target type.
 dnl Check the archs, we want the target type.
 AC_CANONICAL_SYSTEM
 AC_CANONICAL_SYSTEM
@@ -218,4 +219,4 @@ fi
 AC_SUBST(USE_NLS)
 AC_SUBST(USE_NLS)
 AC_PATH_PROG(BASH, bash)
 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)

+ 1 - 1
debian/rules

@@ -35,7 +35,7 @@ build:
 PKG=apt
 PKG=apt
 DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
 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_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')
 APT_CVSTAG=$(shell echo "$(APT_DEBVER)" | sed -e 's/^/v/' -e 's/\./_/g')
 
 
 # Determine the build directory to use
 # Determine the build directory to use

+ 1 - 1
doc/Doxyfile.in

@@ -31,7 +31,7 @@ PROJECT_NAME           = @PACKAGE@
 # This could be handy for archiving the generated documentation or
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 # 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)
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
 # base path where the generated documentation will be put.

+ 0 - 3
doc/makefile

@@ -91,9 +91,6 @@ doxygen-clean:
 	rm -fr $(BUILD)/doc/doxygen
 	rm -fr $(BUILD)/doc/doxygen
 	rm -f $(BUILD)/doc/doxygen-stamp
 	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
 $(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
 	rm -fr $(BUILD)/doc/doxygen
 	rm -fr $(BUILD)/doc/doxygen
 	mkdir $(BUILD)/doc/doxygen  # some versions seem to not create this directory #628799
 	mkdir $(BUILD)/doc/doxygen  # some versions seem to not create this directory #628799

+ 1 - 1
ftparchive/apt-ftparchive.cc

@@ -587,7 +587,7 @@ void LoadBinDir(vector<PackageMap> &PkgList,Configuration &Setup)
 /* */
 /* */
 bool ShowHelp(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__);
 	    COMMON_ARCH,__DATE__,__TIME__);
    if (_config->FindB("version") == true)
    if (_config->FindB("version") == true)
       return true;
       return true;

+ 1 - 1
methods/http.cc

@@ -758,7 +758,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
           Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
           Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
    }
    }
    Req += "User-Agent: " + _config->Find("Acquire::http::User-Agent",
    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)
    if (Debug == true)
       cerr << Req << endl;
       cerr << Req << endl;

+ 1 - 1
methods/https.cc

@@ -219,7 +219,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
    curl_easy_setopt(curl, CURLOPT_USERAGENT,
    curl_easy_setopt(curl, CURLOPT_USERAGENT,
 	_config->Find("Acquire::https::User-Agent",
 	_config->Find("Acquire::https::User-Agent",
 		_config->Find("Acquire::http::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
    // set timeout
    int const timeout = _config->FindI("Acquire::https::Timeout",
    int const timeout = _config->FindI("Acquire::https::Timeout",

+ 1 - 1
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
 	# 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 \
 	$(XGETTEXT) --default-domain=$(PO)/$(PACKAGE)-dummy.pot --foreign --language=c \
 		-o $(PO)/$(PACKAGE)-dummy.pot --force-po --package-name=$(PACKAGE) \
 		-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
 	$(MSGCOMM) --more-than=0 $(PO)/$(PACKAGE)-dummy.pot $(POTFILES) --output=$(PACKAGE)-all.pot
 	rm -f $(PO)/$(PACKAGE)-dummy.pot
 	rm -f $(PO)/$(PACKAGE)-dummy.pot