]> git.saurik.com Git - apt.git/commitdiff
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
authorMichael Vogt <mvo@debian.org>
Thu, 22 Aug 2013 20:26:05 +0000 (22:26 +0200)
committerMichael Vogt <mvo@debian.org>
Thu, 22 Aug 2013 20:26:05 +0000 (22:26 +0200)
apt-pkg/acquire-item.cc
apt-pkg/contrib/cmndline.cc
apt-pkg/contrib/strutl.cc
apt-pkg/tagfile.cc
apt-pkg/tagfile.h
test/integration/test-bug-507998-dist-upgrade-recommends [new file with mode: 0755]

index 95dadcd6d2d7f7fc7905f9f62c1efb989d1ffedb..97b2d1e29a79bcbd63c573883970050a3f12c51a 100644 (file)
@@ -984,6 +984,8 @@ void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash,
    DestFile += ".decomp";
    Desc.URI = decompProg + ":" + FileName;
    QueueURI(Desc);
+
+   // FIXME: this points to a c++ string that goes out of scope
    Mode = decompProg.c_str();
 }
                                                                        /*}}}*/
index 8cef8036872d38021760497580403ada8931c148..2086d91ca88b10b68f8697e3b2aa4580ee999753 100644 (file)
@@ -397,6 +397,7 @@ bool CommandLine::DispatchArg(Dispatch *Map,bool NoMatch)
 void CommandLine::SaveInConfig(unsigned int const &argc, char const * const * const argv)
 {
    char cmdline[100 + argc * 50];
+   memset(cmdline, 0, sizeof(cmdline));
    unsigned int length = 0;
    bool lastWasOption = false;
    bool closeQuote = false;
index d06637155b48e7ea8977f1e7cbc5006ed01351af..0955b69f79a67f538e1af0f59359f543cc3f5bb5 100644 (file)
@@ -943,6 +943,8 @@ bool StrToTime(const string &Val,time_t &Result)
    Tm.tm_isdst = 0;
    if (Month[0] != 0)
       Tm.tm_mon = MonthConv(Month);
+   else
+      Tm.tm_mon = 0; // we don't have a month, so pick something
    Tm.tm_year -= 1900;
    
    // Convert to local time and then to GMT
index 10bc08d9501e385304adb93899ca8a113f3dc3e8..868adf3d2b8c719ee96c0c9b951685d809ab7251 100644 (file)
@@ -233,6 +233,16 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long long Offset)
    return true;
 }
                                                                        /*}}}*/
+// pkgTagSection::pkgTagSection - Constructor                          /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+pkgTagSection::pkgTagSection()
+   : Section(0), TagCount(0), Stop(0), d(NULL)
+{
+   memset(&Indexes, 0, sizeof(Indexes));
+   memset(&AlphaIndexes, 0, sizeof(AlphaIndexes));
+}
+                                                                       /*}}}*/
 // TagSection::Scan - Scan for the end of the header information       /*{{{*/
 // ---------------------------------------------------------------------
 /* This looks for the first double new line in the data stream.
index 66c56799dd42c0408683e2cd0f074f8e9bba1679..518d3dbcd60bf8d8caa512371aac4c1ca56f12b4 100644 (file)
@@ -84,7 +84,7 @@ class pkgTagSection
       Stop = this->Stop;
    };
    
-   pkgTagSection() : Section(0), TagCount(0), d(NULL), Stop(0) {};
+   pkgTagSection();
    virtual ~pkgTagSection() {};
 };
 
diff --git a/test/integration/test-bug-507998-dist-upgrade-recommends b/test/integration/test-bug-507998-dist-upgrade-recommends
new file mode 100755 (executable)
index 0000000..513421a
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+insertinstalledpackage 'tshark' 'amd64' '1.0.4-1' 'Depends: wireshark-common'
+insertinstalledpackage 'wireshark-common' 'amd64' '1.0.4-1' 'Recommends: wireshark (>= 1.0.4-1) | tshark (>= 1.0.4-1)'
+insertpackage 'unstable' 'tshark' 'amd64' '1.2.1-2' 'Depends: wireshark-common (= 1.2.1-2)'
+insertpackage 'unstable' 'wireshark-common' 'amd64' '1.2.1-2' 'Recommends: wireshark (>= 1.2.1-2) | tshark (>= 1.2.1-2)'
+insertpackage 'unstable' 'wireshark' 'amd64' '1.2.1-2' 'Depends: wireshark-common (= 1.2.1-2)'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be upgraded:
+  tshark wireshark-common
+2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+Inst wireshark-common [1.0.4-1] (1.2.1-2 unstable [amd64])
+Inst tshark [1.0.4-1] (1.2.1-2 unstable [amd64])
+Conf wireshark-common (1.2.1-2 unstable [amd64])
+Conf tshark (1.2.1-2 unstable [amd64])' aptget dist-upgrade -s