]> git.saurik.com Git - apt.git/commitdiff
merged from lp:~donkult/apt/experimental
authorMichael Vogt <michael.vogt@ubuntu.com>
Wed, 23 Nov 2011 09:58:44 +0000 (10:58 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Wed, 23 Nov 2011 09:58:44 +0000 (10:58 +0100)
13 files changed:
.bzrignore
apt-pkg/cdrom.cc
configure.in
debian/changelog
debian/control
debian/libapt-inst1.4.install [deleted file]
debian/libapt-inst1.4.install.in [new file with mode: 0644]
debian/libapt-pkg-dev.dirs [deleted file]
debian/libapt-pkg-dev.install [deleted file]
debian/libapt-pkg-dev.install.in [new file with mode: 0644]
debian/libapt-pkg4.12.install [deleted file]
debian/libapt-pkg4.12.install.in [new file with mode: 0644]
debian/rules

index 7c4b11b10c5151cf674421f69786f638cf4db6b3..dab38cf712c8add75bc78d6f19be6d2b5b29417f 100644 (file)
@@ -10,6 +10,8 @@ build/
 configure
 buildlib/config.sub
 buildlib/config.guess
+debian/libapt-pkg[0-9]*.install
+debian/libapt-inst[0-9]*.install
 
 # abichecker related files/dir
 abicheck/apt_build.xml
index a9c63fd214386624dfcd75f3b3caa8808f104658..07983e44f3d54b88d769688ac7f86c485ed228c3 100644 (file)
@@ -78,25 +78,43 @@ bool pkgCdrom::FindPackages(string CD,
    {
       SigList.push_back(CD);
    }
+
    /* Aha! We found some package files. We assume that everything under 
       this dir is controlled by those package files so we don't look down
       anymore */
-   if (stat("Packages",&Buf) == 0 || stat("Packages.gz",&Buf) == 0)
-   {
-      List.push_back(CD);
+    std::vector<std::string> types = APT::Configuration::getCompressionTypes();
+    types.push_back("");
+    for (std::vector<std::string>::const_iterator t = types.begin();
+         t != types.end(); ++t)
+    {
+       std::string filename = std::string("Packages");
+       if ((*t).size() > 0)
+          filename.append("."+*t);
+       if (stat(filename.c_str(), &Buf) == 0)
+       {
+          List.push_back(CD);
       
-      // Continue down if thorough is given
-      if (_config->FindB("APT::CDROM::Thorough",false) == false)
-        return true;
-   }
-   if (stat("Sources.gz",&Buf) == 0 || stat("Sources",&Buf) == 0)
-   {
-      SList.push_back(CD);
+          // Continue down if thorough is given
+          if (_config->FindB("APT::CDROM::Thorough",false) == false)
+             return true;
+          break;
+       }
+    }
+    for (std::vector<std::string>::const_iterator t = types.begin();
+         t != types.end(); ++t)
+    {
+       std::string filename = std::string("Sources");
+       if ((*t).size() > 0)
+          filename.append("."+*t);
+       {
+          SList.push_back(CD);
       
-      // Continue down if thorough is given
-      if (_config->FindB("APT::CDROM::Thorough",false) == false)
-        return true;
-   }
+          // Continue down if thorough is given
+          if (_config->FindB("APT::CDROM::Thorough",false) == false)
+             return true;
+          break;
+       }
+    }
 
    // see if we find translatin indexes
    if (stat("i18n",&Buf) == 0)
@@ -109,9 +127,15 @@ bool pkgCdrom::FindPackages(string CD,
            if (_config->FindB("Debug::aptcdrom",false) == true)
               std::clog << "found translations: " << Dir->d_name << "\n";
            string file = Dir->d_name;
-           if(file.substr(file.size()-3,file.size()) == ".gz")
-              file = file.substr(0,file.size()-3);
-           TransList.push_back(CD+"i18n/"+ file);
+            for (std::vector<std::string>::const_iterator t = types.begin();
+                 t != types.end(); ++t)
+            {
+               std::string needle = "." + *t;
+               if(file.substr(file.size()-needle.size()) == needle)
+                  file = file.substr(0, file.size()-needle.size());
+               TransList.push_back(CD+"i18n/"+ file);
+               break;
+            }
         }
       }
       closedir(D);
@@ -257,11 +281,19 @@ bool pkgCdrom::DropRepeats(vector<string> &List,const char *Name)
    for (unsigned int I = 0; I != List.size(); I++)
    {
       struct stat Buf;
-      if (stat((List[I] + Name).c_str(),&Buf) != 0 &&
-         stat((List[I] + Name + ".gz").c_str(),&Buf) != 0)
-        _error->Errno("stat","Failed to stat %s%s",List[I].c_str(),
-                      Name);
-      Inodes[I] = Buf.st_ino;
+      std::vector<std::string> types = APT::Configuration::getCompressionTypes();
+      types.push_back("");
+      for (std::vector<std::string>::const_iterator t = types.begin();
+           t != types.end(); ++t)
+      {
+         std::string filename = List[I] + Name;
+         if ((*t).size() > 0)
+            filename.append("." + *t);
+         if (stat(filename.c_str(), &Buf) != 0)
+            _error->Errno("stat","Failed to stat %s%s",List[I].c_str(),
+                          Name);
+         Inodes[I] = Buf.st_ino;
+      }
    }
    
    if (_error->PendingError() == true) {
index c2602cf3651d893b8bf3ac73842e412b780cc34a..065afccf1f47f9e6d519d864a3cea9657ee4dea7 100644 (file)
@@ -18,7 +18,7 @@ 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~exp6")
+AC_DEFINE_UNQUOTED(VERSION,"0.8.16~exp9")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index 3c0de2c624d34dd74191e402807b47bb6f2e518a..25e7fa18ed6ea548675bedf09a3d2f55088943f6 100644 (file)
@@ -1,3 +1,21 @@
+apt (0.8.16~exp9) UNRELEASED; urgency=low
+
+  [ Julian Andres Klode ]
+  * apt-pkg/cdrom.cc:
+    - Accept .bz2, .xz files in addition to .gz files (Closes: #649451)
+  
+  [ Michael Vogt ]
+  * apt-pkg/cdrom.cc:
+    - use aptconfiguration to get the supported compression types
+  * debian/control:
+    - bump debhelper build-dep to debhelper (>= 8.1.3~)
+    - set libapt-pkg-dev to multi-arch: same too
+  [ Colin Watson ]
+  * Convert libapt-pkg4.12 and libapt-inst1.4 to Multi-Arch: same.
+  
+ -- Julian Andres Klode <jak@debian.org>  Mon, 21 Nov 2011 18:46:36 +0100
+
 apt (0.8.16~exp8) experimental; urgency=low
 
   [ David Kalnischkies ]
index 7efb6ca8ab980ffa982655b5342f071b4657f54c..24c429ad42918964b0359ce3509db28c1b2393d0 100644 (file)
@@ -6,7 +6,7 @@ Uploaders: Michael Vogt <mvo@debian.org>, Otavio Salvador <otavio@debian.org>,
  Christian Perrier <bubulle@debian.org>, Daniel Burrows <dburrows@debian.org>,
  Julian Andres Klode <jak@debian.org>
 Standards-Version: 3.9.2
-Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 7.2.3~), libdb-dev,
+Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 8.1.3~), libdb-dev,
  gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.0), 
  zlib1g-dev | libz-dev, debiandoc-sgml, xsltproc, docbook-xsl, docbook-xml, 
  po4a (>= 0.34-2), autotools-dev, autoconf, automake, doxygen
@@ -35,9 +35,20 @@ Description: APT's commandline package manager
   * apt-config as an interface to the configuration settings
   * apt-key as an interface to manage authentication keys
 
+Package: libapt-common
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Breaks: libapt-pkg4.12 (<< 0.8.16~exp9), libapt-inst1.4 (<< 0.8.16~exp9)
+Replaces: libapt-pkg4.12 (<< 0.8.16~exp9), libapt-inst1.4 (<< 0.8.16~exp9)
+Description: Common files for APT libraries
+ This package includes translation files common to APT library packages.
+
 Package: libapt-pkg4.12
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, libapt-common
 Description: APT's package managment runtime library
  This library provides the common functionality for searching and
  managing packages as well as information about packages.
@@ -56,7 +67,9 @@ Description: APT's package managment runtime library
 
 Package: libapt-inst1.4
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, libapt-common
 Description: APT's deb package format runtime library
  This library provides methods to query and extract information 
  from deb packages. This includes the control data and the package
@@ -73,7 +86,9 @@ Description: Documentation for APT
 
 Package: libapt-pkg-dev
 Architecture: any
+Multi-Arch: same
 Priority: optional
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${libapt-pkg-name} (= ${binary:Version}), ${libapt-inst-name} (= ${binary:Version}), ${misc:Depends}, zlib1g-dev | zlib-dev
 Section: libdevel
 Description: Development files for APT's libapt-pkg and libapt-inst
diff --git a/debian/libapt-inst1.4.install b/debian/libapt-inst1.4.install
deleted file mode 100644 (file)
index b7b63be..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin/libapt-inst*.so.* usr/lib/
-usr/share/locale/*/*/libapt-inst*.mo
diff --git a/debian/libapt-inst1.4.install.in b/debian/libapt-inst1.4.install.in
new file mode 100644 (file)
index 0000000..b81d15c
--- /dev/null
@@ -0,0 +1 @@
+bin/libapt-inst*.so.* usr/lib/@DEB_HOST_MULTIARCH@/
diff --git a/debian/libapt-pkg-dev.dirs b/debian/libapt-pkg-dev.dirs
deleted file mode 100644 (file)
index 844642a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib
-usr/include/apt-pkg
diff --git a/debian/libapt-pkg-dev.install b/debian/libapt-pkg-dev.install
deleted file mode 100644 (file)
index bd1a6c1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-bin/libapt-pkg*.so usr/lib/
-bin/libapt-inst*.so usr/lib/
-include/apt-pkg/*.h usr/include/apt-pkg/
diff --git a/debian/libapt-pkg-dev.install.in b/debian/libapt-pkg-dev.install.in
new file mode 100644 (file)
index 0000000..be80221
--- /dev/null
@@ -0,0 +1,3 @@
+bin/libapt-pkg*.so usr/lib/@DEB_HOST_MULTIARCH@/
+bin/libapt-inst*.so usr/lib/@DEB_HOST_MULTIARCH@/
+include/apt-pkg/*.h usr/include/apt-pkg/
diff --git a/debian/libapt-pkg4.12.install b/debian/libapt-pkg4.12.install
deleted file mode 100644 (file)
index 91b39a3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin/libapt-pkg*.so.* usr/lib/
-usr/share/locale/*/*/libapt-pkg*.mo
diff --git a/debian/libapt-pkg4.12.install.in b/debian/libapt-pkg4.12.install.in
new file mode 100644 (file)
index 0000000..0db4075
--- /dev/null
@@ -0,0 +1 @@
+bin/libapt-pkg*.so.* usr/lib/@DEB_HOST_MULTIARCH@/
index 30474c06b71fb4cd9ac6adbd7a70a45119e97e52..6a5c95d22c7c4286bb526d778f04dd8d7a09a185 100755 (executable)
@@ -5,6 +5,7 @@
 
 export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 # FOR AUTOCONF 2.52 AND NEWER ONLY
 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
@@ -118,9 +119,31 @@ clean:
 
        [ ! -f Makefile ] || $(MAKE) clean distclean
        rm -rf build
+       rm -f debian/$(LIBAPT_PKG).install debian/$(LIBAPT_INST).install \
+             debian/libapt-pkg-dev.install
 
-binary-indep: apt-doc libapt-pkg-doc
+debian/%.install: debian/%.install.in
+       sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $< > $@
+
+binary-indep: libapt-common apt-doc libapt-pkg-doc
 # Build architecture-independent files here.
+libapt-common: build
+       dh_testdir -p$@
+       dh_testroot -p$@
+       dh_prep -p$@
+       dh_installdirs -p$@
+
+       dh_install -p$@ --sourcedir=$(BLD)
+       dh_installdocs -p$@
+       dh_installchangelogs -p$@
+       dh_strip -p$@
+       dh_compress -p$@
+       dh_fixperms -p$@
+       dh_installdeb -p$@
+       dh_gencontrol -p$@
+       dh_md5sums -p$@
+       dh_builddeb -p$@
+
 libapt-pkg-doc: build-doc
        dh_testdir -p$@
        dh_testroot -p$@
@@ -217,7 +240,7 @@ apt: build build-doc
        dh_md5sums -p$@
        dh_builddeb -p$@
 
-libapt-pkg-dev: build
+libapt-pkg-dev: build debian/libapt-pkg-dev.install
        dh_testdir -p$@
        dh_testroot -p$@
        dh_prep -p$@
@@ -265,7 +288,7 @@ apt-utils: build
        dh_md5sums -p$@
        dh_builddeb -p$@
 
-$(LIBAPT_PKG): build
+$(LIBAPT_PKG): build debian/$(LIBAPT_PKG).install
        dh_testdir -p$@
        dh_testroot -p$@
        dh_prep -p$@
@@ -284,7 +307,7 @@ $(LIBAPT_PKG): build
        dh_md5sums -p$@
        dh_builddeb -p$@
 
-$(LIBAPT_INST): build
+$(LIBAPT_INST): build debian/$(LIBAPT_INST).install
        dh_testdir -p$@
        dh_testroot -p$@
        dh_prep -p$@