]> git.saurik.com Git - apt.git/commitdiff
merged debian/sid branch from git.debian.org
authorMichael Vogt <mvo@ubuntu.com>
Tue, 2 Jul 2013 14:53:45 +0000 (16:53 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Tue, 2 Jul 2013 14:53:45 +0000 (16:53 +0200)
23 files changed:
1  2 
apt-pkg/acquire-item.cc
apt-pkg/contrib/fileutl.cc
apt-pkg/contrib/fileutl.h
apt-pkg/contrib/strutl.cc
apt-pkg/packagemanager.cc
cmdline/apt-get.cc
cmdline/apt-key
configure.in
debian/changelog
debian/control
debian/rules
doc/makefile
doc/po/de.po
doc/po/es.po
doc/po/fr.po
doc/po/it.po
doc/po/ja.po
doc/po/pl.po
doc/po/pt.po
doc/po/pt_BR.po
po/apt-all.pot
test/interactive-helper/aptwebserver.cc
test/interactive-helper/makefile

Simple merge
Simple merge
Simple merge
index 64731b482b9556e4fc31ac245eff7d36beca5b85,d0e74d8c59cd0590c5d16f2b9252474c45b106e6..8ce3a306fccccd398e363ede8e388c42d1546d24
@@@ -759,7 -759,7 +759,8 @@@ bool ReadMessages(int Fd, vector<string
        for (char *I = Buffer; I + 1 < End; I++)
        {
         if (I[1] != '\n' ||
-            (strncmp(I, "\n\n", 2) != 0 && strncmp(I, "\r\n\r\n", 4) != 0))
++
+              (I[0] != '\n' && strncmp(I, "\r\n\r\n", 4) != 0))
            continue;
         
         // Pull the message out
index 9848ac1b0c81100ff851844f178f853c497bfe68,310934c42d4dea65bcd4b660f4cb994876b03292..8c0d2e855667ee62f861729d9da21a3f242dec69
@@@ -338,8 -338,9 +338,9 @@@ bool pkgPackageManager::SmartConfigure(
        however if there is a loop (A depends on B, B depends on A) this will not 
        be the case, so check for dependencies before configuring. */
     bool Bad = false, Changed = false;
 -   const unsigned int max_loops = _config->FindI("APT::pkgPackageManager::MaxLoopCount", 500);
 +   const unsigned int max_loops = _config->FindI("APT::pkgPackageManager::MaxLoopCount", 5000);
     unsigned int i=0;
+    std::list<DepIterator> needConfigure;
     do
     {
        Changed = false;
Simple merge
diff --cc cmdline/apt-key
Simple merge
diff --cc configure.in
index 44334e3e98c8f218c6839e9f27ff01a86edf2c2a,541d0e95fac2c43edc1a4500cbfb9680603a19cb..b0ec78c8104a515aafbecb1abefeb7ddf74725fe
@@@ -18,7 -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)
  
  PACKAGE="apt"
- PACKAGE_VERSION="0.9.7.9~exp3ubuntu1"
 -PACKAGE_VERSION="0.9.8.1"
++PACKAGE_VERSION="0.9.9ubuntu1"
  PACKAGE_MAIL="APT Development Team <deity@lists.debian.org>"
  AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
  AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"$PACKAGE_VERSION")
index 1194658c2852cdbeeeba3bd684120aa3840b1162,b20bc1f60abbefae8c828ac04c85e19520eb95d3..ae81419667ca54c8fbfc4b9336e472bf8ac519d2
- apt (0.9.7.9~exp3ubuntu1) UNRELEASEDsaucy; urgency=low
++apt (0.9.9ubuntu1) UNRELEASEDsaucy; urgency=low
 +
-   * merged from debian
++  * merged from the debian/sid branch
 +
-  -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 30 Apr 2013 10:28:43 +0200
++ -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 02 Jul 2013 16:48:08 +0200
 +
- apt (0.9.7.9~exp3) experimental; urgency=low
+ apt (0.9.9) unstable; urgency=low
+   [ Michael Vogt ]
+   * improve debug output for the Debug::pkgProblemResolver and
+     Debug::pkgDepCache::AutoInstall
+   * improve apt-cdrom output when no CD-ROM can be auto-detected
+   * document --no-auto-detect in apt-cdrom
+   [ David Kalnischkies ]
+   * build the en manpages in subdirectory doc/en
+   * remove -ldl from cdrom and -lutil from apt-get linkage
+   * rewrite pkgOrderList::DepRemove to stop incorrect immediate setting
+     (Closes: 645713)
+   * prefer Essentials over Removals in ordering score
+   * fix priority sorting by prefering higher in MarkInstall
+   * try all providers in order if uninstallable in MarkInstall
+   * do unpacks before configures in SmartConfigure (Closes: #707578)
+   * fix support for multiple patterns in apt-cache search (Closes: #691453)
+   * set Fail flag in FileFd on all errors consistently
+   * don't explicitly init ExtractTar InFd with invalid fd
+   * OpenDescriptor should autoclose fd always on error (Closes: #704608)
+   * fail in CopyFile if the FileFds have error flag set
+   * ensure state-dir exists before coyping cdrom files
+   * fix file location for configure-index.gz in apt.conf(5) (Closes: #711921)
+   * handle missing "Description" in apt-cache show (Closes: #712435)
+   * try defaults if auto-detection failed in apt-cdrom (Closes: #712433)
+   * support \n and \r\n line endings in ReadMessages
+   * do not redownload unchanged InRelease files
+   * trigger NODATA error for invalid InRelease files (Closes: #712486)
+  -- Michael Vogt <mvo@debian.org>  Tue, 02 Jul 2013 08:58:33 +0200
+ apt (0.9.8.2) unstable; urgency=low
+   [ Programs translations ]
+   * French translation : typo fix. Closes: #677272
+   [ Guillem Jover ]
+   * Update Vcs fields (Closes: #708562)
+   
+   [ Michael Vogt ]
+   * buildlib/apti18n.h.in:
+     - fix build failure when building without NLS (closes: #671587)
+   
+   [ Gregoire Menuel ]
+   * Fix double free (closes: #711045)
+   
+   [ Raphael Geissert ]
+   * Fix crash when the "mirror" method does not find any entry
+     (closes: #699303)
+   [ Johan Kiviniemi ]
+   * cmdline/apt-key:
+     - Create new keyrings with mode 0644 instead of 0600.
+     - Accept a nonexistent --keyring file with the adv subcommand as well.
+  -- Michael Vogt <mvo@debian.org>  Thu, 06 Jun 2013 19:15:14 +0200
+ apt (0.9.8.1) unstable; urgency=low
+   [ David Kalnischkies ]
+   * apt-pkg/indexcopy.cc:
+     - non-inline RunGPGV methods to restore ABI compatibility with previous
+       versions to fix partial upgrades (Closes: #707771)
+   
+   [ Michael Vogt ]
+   * moved source to http://git.debian.org/apt/apt.git
+   * updated gbp.conf to match what bzr-buildpackage is doing
+   * remove .bzr-buildpackage/default.conf (superseeded by gbp.conf)
+  -- Michael Vogt <mvo@debian.org>  Thu, 16 May 2013 14:50:43 +0200
+ apt (0.9.8) unstable; urgency=low
+   [ Ludovico Cavedon ]
+   * properly handle if-modfied-since with libcurl/https 
+     (closes: #705648)
+   
+   [ Andreas Beckman ]
+   * apt-pkg/algorithms.cc:
+     - Do not propagate negative scores from rdepends. Propagating the absolute
+       value of a negative score may boost obsolete packages and keep them
+       installed instead of installing their successors.  (Closes: #699759)
++
++  [ Michael Vogt ]
++  * apt-pkg/sourcelist.cc:
++    - fix segfault when a hostname contains a [, thanks to
++      Tzafrir Cohen (closes: #704653)
++  * debian/control:
++    - replace manpages-it (closes: #704723)
++
++  [ David Kalnischkies ]
++  * various simple changes to fix cppcheck warnings
++  * apt-pkg/pkgcachegen.cc:
++    - do not store the MD5Sum for every description language variant as
++      it will be the same for all so it can be shared to save cache space
++    - handle language tags for descriptions are unique strings to be shared
++    - factor version string creation out of NewDepends, so we can easily reuse
++      version strings e.g. for implicit multi-arch dependencies
++    - equal comparisions are used mostly in same-source relations,
++      so use this to try to reuse some version strings
++    - sort group and package names in the hashtable on insert
++    - share version strings between same versions (of different architectures)
++      to save some space and allow quick comparisions later on
++  * apt-pkg/pkgcache.cc:
++    - assume sorted hashtable entries for groups/packages
++  * apt-pkg/cacheiterators.h:
++    - provide DepIterator::IsSatisfied as a nicer shorthand for DepCheck
++  * apt-pkg/deb/debversion.cc:
++    - add a string-equal shortcut for equal version comparisions
++
++  [ Marc Deslauriers ]
++  * make apt-ftparchive generate missing deb-src hashes (LP: #1078697)
++
++  [ Yaroslav Halchenko ]
++  * Fix English spelling error in a message ('A error'). Unfuzzy
++    translations. Closes: #705087
++
++  [ Programs translations ]
++  * French translation completed (Christian Perrier)
++
++  [ Manpages translations ]
++  * French translation completed (Christian Perrier)
++
++  [ Daniel Hartwig ]
++  * apt-pkg/contrib/strutl.cc:
++    - include port in shortened URIs (e.g. with apt-cache policy, progress
++      display) thanks to James McCoy (Closes: #154868, #322074)
++    - percent-encode username and password when writing URIs
++  * methods/http.cc:
++    - properly escape IP-literals (e.g. IPv6 address) when building
++      Host headers and URIs (Closes: #620344)
++  * methods/https.cc:
++    - use https_proxy environment variable if present, falling back to
++      http_proxy otherwise
++    - use authentication credentials from proxy URI
++      (Closes: #651640, LP: #1087512)
++    - environment variables do not override an explicit no proxy
++      directive ("DIRECT") in apt.conf
++    - disregard all_proxy environment variable, like other methods
++
++ -- Michael Vogt <mvo@debian.org>  Wed, 08 May 2013 18:43:28 +0200
 +
++apt (0.9.7.9~exp3) experimental; urgency=low
+   
    [ Michael Vogt ]
    * apt-pkg/sourcelist.cc:
      - fix segfault when a hostname contains a [, thanks to 
diff --cc debian/control
index 5cdacfc34ea64fba54e2828bae5f3098f26ef962,7730c249155ad8fd0a9766971779fd8dc6fcbc8f..3d4fcc86dfc044ea96609728fe73069dab8d594c
@@@ -13,8 -12,8 +13,8 @@@ Build-Depends: dpkg-dev (>= 1.15.8), de
   po4a (>= 0.34-2), autotools-dev, autoconf, automake
  Build-Depends-Indep: doxygen, debiandoc-sgml
  Build-Conflicts: autoconf2.13, automake1.4
- Vcs-Bzr: lp:~ubuntu-core-dev/apt/ubuntu
- Vcs-Browser: http://code.launchpad.net/apt/ubuntu
 -Vcs-Git: git://anonscm.debian.org/apt/apt.git
 -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=apt/apt.git
++XS-Original-Vcs-Git: git://anonscm.debian.org/apt/apt.git
++XS-Original-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=apt/apt.git
  
  Package: apt
  Architecture: any
diff --cc debian/rules
Simple merge
diff --cc doc/makefile
index 2516cd1281cbf10f317c224b71ff1bd8cb9dfedd,274fbc2783d8c8b20298bd81cbe4c08bb049f946..266caa99002d1e4e88452b7d8482c9801ca15893
@@@ -13,36 -12,8 +12,8 @@@ include $(DEBIANDOC_H
  
  doc: manpages debiandoc
  
- # Do not use XMLTO, build the manpages directly with XSLTPROC
- ifdef XSLTPROC
- # generate a list of accepted man page translations
- SOURCE = $(patsubst %.xml,%,$(wildcard *.?.xml))
- INCLUDES = apt.ent apt-verbatim.ent
- STYLESHEET=manpage-style.xsl
- LOCAL := manpage-$(firstword $(SOURCE))
- $(LOCAL)-LIST := $(SOURCE)
- # Install generation hooks
- manpages: $($(LOCAL)-LIST)
- $($(LOCAL)-LIST) :: % : %.xml $(STYLESHEET) $(INCLUDES)
-       echo Creating man page $@
-       $(XSLTPROC) -o $@ $(STYLESHEET) $<
- # Clean rule
- .PHONY: veryclean/$(LOCAL)
- veryclean: veryclean/$(LOCAL)
- veryclean/$(LOCAL):
-       -rm -rf $($(@F)-LIST)
- endif
- # Chain to the manpage rule
- SOURCE = apt.8
- include $(MANPAGE_H)
  examples/sources.list: examples/sources.list.in apt-verbatim.ent
 -      sed -e 's#&stable-codename;#$(shell grep --max-count=1 '^<!ENTITY stable-codename "' apt-verbatim.ent | cut -d'"' -f 2)#g' examples/sources.list.in > examples/sources.list
 +      sed -e 's#&ubuntu-codename;#$(shell grep --max-count=1 '^<!ENTITY ubuntu-codename "' apt-verbatim.ent | cut -d'"' -f 2)#g' examples/sources.list.in > examples/sources.list
  
  # Examples
  SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
diff --cc doc/po/de.po
index e2052297fdb068205235dfb5e976ba11f0add9eb,8ecbf4cbf12649fc81574540f5923585c98d6e5c..7ef5d39c09ed168839e280948dd8edf3f02cde45
@@@ -7,7 -7,7 +7,11 @@@ msgid "
  msgstr ""
  "Project-Id-Version: apt-doc 0.9.7\n"
  "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
++<<<<<<< HEAD
 +"POT-Creation-Date: 2013-04-30 10:29+0300\n"
++=======
+ "POT-Creation-Date: 2013-06-13 13:46+0300\n"
++>>>>>>> upstream/debian/sid
  "PO-Revision-Date: 2012-06-25 22:49+0100\n"
  "Last-Translator: Chris Leick <c.leick@vollbio.de>\n"
  "Language-Team: German <debian-l10n-german@lists.debian.org>\n"
diff --cc doc/po/es.po
index bfdfd63721df812cdca20c7a96dc42cd8a826ce1,38b2645eafbd0848059d7047096a868fe4af43e4..a6fbc5da2d65e155b63c3f7b584c28c9099ae620
@@@ -38,7 -38,7 +38,11 @@@ msgid "
  msgstr ""
  "Project-Id-Version: apt 0.9.7.1\n"
  "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
++<<<<<<< HEAD
 +"POT-Creation-Date: 2013-04-30 10:29+0300\n"
++=======
+ "POT-Creation-Date: 2013-06-13 13:46+0300\n"
++>>>>>>> upstream/debian/sid
  "PO-Revision-Date: 2012-07-14 12:21+0200\n"
  "Last-Translator: Omar Campagne <ocampagne@gmail.com>\n"
  "Language-Team: Debian l10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
diff --cc doc/po/fr.po
index 5c7f521c97dceadc641b717a0ed9c589c3c59055,c2f4b6d83712c3252ff0d81b45b61a25ed7f39d2..41358cfa29e21bc872072d024c46d36d4c7cc7e1
@@@ -10,7 -10,7 +10,11 @@@ msgid "
  msgstr ""
  "Project-Id-Version: \n"
  "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
++<<<<<<< HEAD
 +"POT-Creation-Date: 2013-04-30 10:29+0300\n"
++=======
+ "POT-Creation-Date: 2013-06-13 13:46+0300\n"
++>>>>>>> upstream/debian/sid
  "PO-Revision-Date: 2013-04-09 07:56+0200\n"
  "Last-Translator: Christian Perrier <bubulle@debian.org>\n"
  "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
diff --cc doc/po/it.po
index 59a54917e989f5579c4bbb1d1810cb451370fe5b,df144e2b7b5245b164858ec5ce507d338b6ad2b2..f6754c1fb543affeb0e48a3208ee10451b5db9af
@@@ -11,7 -11,7 +11,11 @@@ msgid "
  msgstr ""
  "Project-Id-Version: \n"
  "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
++<<<<<<< HEAD
 +"POT-Creation-Date: 2013-04-30 10:29+0300\n"
++=======
+ "POT-Creation-Date: 2013-06-13 13:46+0300\n"
++>>>>>>> upstream/debian/sid
  "PO-Revision-Date: 2012-12-23 18:04+0200\n"
  "Last-Translator: Beatrice Torracca <beatricet@libero.it>\n"
  "Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
diff --cc doc/po/ja.po
index cb2ae7f48613694998ca4c9013b0a6d38d73af72,6b767f195d702bfcd78fdc3b1b051d2f59bdbf3a..866cf0e43487368b634818e7111b247b26f24432
@@@ -8,7 -8,7 +8,11 @@@ msgid "
  msgstr ""
  "Project-Id-Version: apt 0.7.25.3\n"
  "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
++<<<<<<< HEAD
 +"POT-Creation-Date: 2013-04-30 10:29+0300\n"
++=======
+ "POT-Creation-Date: 2013-06-13 13:46+0300\n"
++>>>>>>> upstream/debian/sid
  "PO-Revision-Date: 2012-08-08 07:58+0900\n"
  "Last-Translator: KURASAWA Nozomu <nabetaro@debian.or.jp>\n"
  "Language-Team: Debian Japanese List <debian-japanese@lists.debian.org>\n"
diff --cc doc/po/pl.po
index 4388534f8b4530ecc38a603f093b5ffdbec7ed90,2b33324b6e96a3dbb413014a60a34846b086397e..ee4461f399b64939d5ea0ed72236cd296f1fa4f9
@@@ -11,7 -11,7 +11,11 @@@ msgid "
  msgstr ""
  "Project-Id-Version: apt 0.9.7.3\n"
  "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
++<<<<<<< HEAD
 +"POT-Creation-Date: 2013-04-30 10:29+0300\n"
++=======
+ "POT-Creation-Date: 2013-06-13 13:46+0300\n"
++>>>>>>> upstream/debian/sid
  "PO-Revision-Date: 2012-07-28 21:59+0200\n"
  "Last-Translator: Robert Luberda <robert@debian.org>\n"
  "Language-Team: Polish <manpages-pl-list@lists.sourceforge.net>\n"
diff --cc doc/po/pt.po
index 314b5771bc3d45d330da0007762d9c2c4d925ecb,726b184d0103b5214e80f41682c6622b6944da60..79d90d65b406b702f4a747a9da614e0b32d2da70
@@@ -7,7 -7,7 +7,11 @@@ msgid "
  msgstr ""
  "Project-Id-Version: apt 0.9.7.1\n"
  "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
++<<<<<<< HEAD
 +"POT-Creation-Date: 2013-04-30 10:29+0300\n"
++=======
+ "POT-Creation-Date: 2013-06-13 13:46+0300\n"
++>>>>>>> upstream/debian/sid
  "PO-Revision-Date: 2012-09-03 01:53+0100\n"
  "Last-Translator: Américo Monteiro <a_monteiro@netcabo.pt>\n"
  "Language-Team: Portuguese <l10n@debianpt.org>\n"
diff --cc doc/po/pt_BR.po
index d2f597a6a941a986c2b43fc885b2f9e94063f8b9,00619cd222c0ce2a1896215f9107b65dbe8c4cc3..a415d95286940ad580a04c35bfe6b83dfc4dd624
@@@ -10,7 -10,7 +10,11 @@@ msgid "
  msgstr ""
  "Project-Id-Version: apt\n"
  "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
++<<<<<<< HEAD
 +"POT-Creation-Date: 2013-04-30 10:29+0300\n"
++=======
+ "POT-Creation-Date: 2013-06-13 13:46+0300\n"
++>>>>>>> upstream/debian/sid
  "PO-Revision-Date: 2004-09-20 17:02+0000\n"
  "Last-Translator: André Luís Lopes <andrelop@debian.org>\n"
  "Language-Team: <debian-l10n-portuguese@lists.debian.org>\n"
diff --cc po/apt-all.pot
index f0c430fef7a3ebed82dbf3ded4554d1c2515cf0f,1bfca4088a0f11308113e7ad4ba02a20cd058765..518844781bf11020acef53dbfa0f7e9e4952c520
@@@ -5,9 -5,9 +5,15 @@@
  #, fuzzy
  msgid ""
  msgstr ""
++<<<<<<< HEAD
 +"Project-Id-Version: apt 0.9.7.7ubuntu3\n"
 +"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
 +"POT-Creation-Date: 2013-04-11 14:52+0200\n"
++=======
+ "Project-Id-Version: apt 0.9.8.1\n"
+ "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
+ "POT-Creation-Date: 2013-06-26 07:37+0200\n"
++>>>>>>> upstream/debian/sid
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@@ -151,8 -151,8 +157,13 @@@ msgstr "
  msgid "  Version table:"
  msgstr ""
  
++<<<<<<< HEAD
 +#: cmdline/apt-cache.cc:1683 cmdline/apt-cdrom.cc:198 cmdline/apt-config.cc:81
 +#: cmdline/apt-get.cc:3366 cmdline/apt-mark.cc:375
++=======
+ #: cmdline/apt-cache.cc:1723 cmdline/apt-cdrom.cc:206 cmdline/apt-config.cc:81
+ #: cmdline/apt-get.cc:3361 cmdline/apt-mark.cc:375
++>>>>>>> upstream/debian/sid
  #: cmdline/apt-extracttemplates.cc:229 ftparchive/apt-ftparchive.cc:591
  #: cmdline/apt-internal-solver.cc:33 cmdline/apt-sortpkgs.cc:147
  #, c-format
@@@ -569,7 -577,7 +588,11 @@@ msgstr "
  msgid "Do you want to continue [Y/n]? "
  msgstr ""
  
++<<<<<<< HEAD
 +#: cmdline/apt-get.cc:1356 cmdline/apt-get.cc:2656 apt-pkg/algorithms.cc:1554
++=======
+ #: cmdline/apt-get.cc:1356 cmdline/apt-get.cc:2655 apt-pkg/algorithms.cc:1562
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Failed to fetch %s  %s\n"
  msgstr ""
@@@ -743,7 -751,7 +766,11 @@@ msgstr "
  msgid "Calculating upgrade... "
  msgstr ""
  
++<<<<<<< HEAD
 +#: cmdline/apt-get.cc:2188 methods/ftp.cc:711 methods/connect.cc:115
++=======
+ #: cmdline/apt-get.cc:2187 methods/ftp.cc:711 methods/connect.cc:116
++>>>>>>> upstream/debian/sid
  msgid "Failed"
  msgstr ""
  
@@@ -923,11 -931,11 +950,19 @@@ msgstr "
  msgid "Changelog for %s (%s)"
  msgstr ""
  
++<<<<<<< HEAD
 +#: cmdline/apt-get.cc:3371
 +msgid "Supported modules:"
 +msgstr ""
 +
 +#: cmdline/apt-get.cc:3412
++=======
+ #: cmdline/apt-get.cc:3366
+ msgid "Supported modules:"
+ msgstr ""
+ #: cmdline/apt-get.cc:3407
++>>>>>>> upstream/debian/sid
  msgid ""
  "Usage: apt-get [options] command\n"
  "       apt-get [options] install|remove pkg1 [pkg2 ...]\n"
  "                       This APT has Super Cow Powers.\n"
  msgstr ""
  
++<<<<<<< HEAD
 +#: cmdline/apt-get.cc:3577
++=======
+ #: cmdline/apt-get.cc:3572
++>>>>>>> upstream/debian/sid
  msgid ""
  "NOTE: This is only a simulation!\n"
  "      apt-get needs root privileges for real execution.\n"
@@@ -1041,7 -1049,8 +1080,12 @@@ msgid "%s was already not hold.\n
  msgstr ""
  
  #: cmdline/apt-mark.cc:245 cmdline/apt-mark.cc:326
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:828 apt-pkg/deb/dpkgpm.cc:1001
++=======
+ #: apt-pkg/contrib/fileutl.cc:829 apt-pkg/contrib/gpgv.cc:223
+ #: apt-pkg/deb/dpkgpm.cc:1002
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Waited for %s but it wasn't there"
  msgstr ""
@@@ -1175,8 -1184,8 +1219,13 @@@ msgstr "
  msgid "Server closed the connection"
  msgstr ""
  
++<<<<<<< HEAD
 +#: methods/ftp.cc:349 methods/rsh.cc:199 apt-pkg/contrib/fileutl.cc:1274
 +#: apt-pkg/contrib/fileutl.cc:1283 apt-pkg/contrib/fileutl.cc:1286
++=======
+ #: methods/ftp.cc:349 methods/rsh.cc:199 apt-pkg/contrib/fileutl.cc:1263
+ #: apt-pkg/contrib/fileutl.cc:1272 apt-pkg/contrib/fileutl.cc:1275
++>>>>>>> upstream/debian/sid
  msgid "Read error"
  msgstr ""
  
@@@ -1189,8 -1198,8 +1238,13 @@@ msgid "Protocol corruption
  msgstr ""
  
  #: methods/ftp.cc:457 methods/rred.cc:238 methods/rsh.cc:241
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:1372 apt-pkg/contrib/fileutl.cc:1381
 +#: apt-pkg/contrib/fileutl.cc:1384 apt-pkg/contrib/fileutl.cc:1410
++=======
+ #: apt-pkg/contrib/fileutl.cc:1359 apt-pkg/contrib/fileutl.cc:1368
+ #: apt-pkg/contrib/fileutl.cc:1371 apt-pkg/contrib/fileutl.cc:1396
++>>>>>>> upstream/debian/sid
  msgid "Write error"
  msgstr ""
  
@@@ -1328,28 -1342,36 +1382,60 @@@ msgstr "
  msgid "Unable to connect to %s:%s:"
  msgstr ""
  
++<<<<<<< HEAD
 +#: methods/gpgv.cc:180
++=======
+ #: methods/gpgv.cc:166
++>>>>>>> upstream/debian/sid
  msgid ""
  "Internal error: Good signature, but could not determine key fingerprint?!"
  msgstr ""
  
++<<<<<<< HEAD
 +#: methods/gpgv.cc:185
 +msgid "At least one invalid signature was encountered."
 +msgstr ""
 +
 +#: methods/gpgv.cc:189
 +msgid "Could not execute 'gpgv' to verify signature (is gpgv installed?)"
 +msgstr ""
 +
 +#: methods/gpgv.cc:194
 +msgid "Unknown error executing gpgv"
 +msgstr ""
 +
 +#: methods/gpgv.cc:228 methods/gpgv.cc:235
 +msgid "The following signatures were invalid:\n"
 +msgstr ""
 +
 +#: methods/gpgv.cc:242
++=======
+ #: methods/gpgv.cc:170
+ msgid "At least one invalid signature was encountered."
+ msgstr ""
+ #: methods/gpgv.cc:172
+ msgid "Could not execute 'gpgv' to verify signature (is gpgv installed?)"
+ msgstr ""
+ #. TRANSLATORS: %s is a single techy word like 'NODATA'
+ #: methods/gpgv.cc:178
+ #, c-format
+ msgid ""
+ "Clearsigned file isn't valid, got '%s' (does the network require "
+ "authentication?)"
+ msgstr ""
+ #: methods/gpgv.cc:182
+ msgid "Unknown error executing gpgv"
+ msgstr ""
+ #: methods/gpgv.cc:215 methods/gpgv.cc:222
+ msgid "The following signatures were invalid:\n"
+ msgstr ""
+ #: methods/gpgv.cc:229
++>>>>>>> upstream/debian/sid
  msgid ""
  "The following signatures couldn't be verified because the public key is not "
  "available:\n"
@@@ -1387,31 -1409,31 +1473,59 @@@ msgstr "
  msgid "Unknown date format"
  msgstr ""
  
++<<<<<<< HEAD
 +#: methods/http.cc:818
 +msgid "Select failed"
 +msgstr ""
 +
 +#: methods/http.cc:823
 +msgid "Connection timed out"
 +msgstr ""
 +
 +#: methods/http.cc:846
 +msgid "Error writing to output file"
 +msgstr ""
 +
 +#: methods/http.cc:877
 +msgid "Error writing to file"
 +msgstr ""
 +
 +#: methods/http.cc:905
 +msgid "Error writing to the file"
 +msgstr ""
 +
 +#: methods/http.cc:919
 +msgid "Error reading from server. Remote end closed connection"
 +msgstr ""
 +
 +#: methods/http.cc:921
++=======
+ #: methods/http.cc:827
+ msgid "Select failed"
+ msgstr ""
+ #: methods/http.cc:832
+ msgid "Connection timed out"
+ msgstr ""
+ #: methods/http.cc:855
+ msgid "Error writing to output file"
+ msgstr ""
+ #: methods/http.cc:886
+ msgid "Error writing to file"
+ msgstr ""
+ #: methods/http.cc:914
+ msgid "Error writing to the file"
+ msgstr ""
+ #: methods/http.cc:928
+ msgid "Error reading from server. Remote end closed connection"
+ msgstr ""
+ #: methods/http.cc:930
++>>>>>>> upstream/debian/sid
  msgid "Error reading from server"
  msgstr ""
  
@@@ -1429,11 -1451,11 +1543,19 @@@ msgstr "
  
  #. Only warn if there are no sources.list.d.
  #. Only warn if there is no sources.list file.
++<<<<<<< HEAD
 +#: methods/mirror.cc:95 apt-inst/extract.cc:465
 +#: apt-pkg/contrib/cdromutl.cc:183 apt-pkg/contrib/fileutl.cc:400
 +#: apt-pkg/contrib/fileutl.cc:513 apt-pkg/sourcelist.cc:208
 +#: apt-pkg/sourcelist.cc:214 apt-pkg/acquire.cc:485 apt-pkg/init.cc:109
 +#: apt-pkg/init.cc:117 apt-pkg/clean.cc:36 apt-pkg/policy.cc:362
++=======
+ #: methods/mirror.cc:95 apt-inst/extract.cc:464
+ #: apt-pkg/contrib/cdromutl.cc:183 apt-pkg/contrib/fileutl.cc:401
+ #: apt-pkg/contrib/fileutl.cc:514 apt-pkg/sourcelist.cc:208
+ #: apt-pkg/sourcelist.cc:214 apt-pkg/acquire.cc:485 apt-pkg/init.cc:108
+ #: apt-pkg/init.cc:116 apt-pkg/clean.cc:36 apt-pkg/policy.cc:362
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Unable to read %s"
  msgstr ""
@@@ -1540,7 -1567,7 +1667,11 @@@ msgid "
  "  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
  msgstr ""
  
++<<<<<<< HEAD
 +#: cmdline/apt-extracttemplates.cc:271 apt-pkg/pkgcachegen.cc:1339
++=======
+ #: cmdline/apt-extracttemplates.cc:271 apt-pkg/pkgcachegen.cc:1388
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Unable to write to %s"
  msgstr ""
@@@ -2083,7 -2110,7 +2214,11 @@@ msgstr "
  msgid "%lis"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/strutl.cc:1167
++=======
+ #: apt-pkg/contrib/strutl.cc:1173
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Selection %s not found"
  msgstr ""
@@@ -2264,60 -2301,60 +2399,108 @@@ msgstr "
  msgid "Sub-process %s received signal %u."
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:846
++=======
+ #: apt-pkg/contrib/fileutl.cc:847 apt-pkg/contrib/gpgv.cc:243
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Sub-process %s returned an error code (%u)"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:848
++=======
+ #: apt-pkg/contrib/fileutl.cc:849 apt-pkg/contrib/gpgv.cc:236
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Sub-process %s exited unexpectedly"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:1004 apt-pkg/indexcopy.cc:659
++=======
+ #: apt-pkg/contrib/fileutl.cc:985
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Could not open file %s"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:1066
++=======
+ #: apt-pkg/contrib/fileutl.cc:1062
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Could not open file descriptor %d"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:1156
 +msgid "Failed to create subprocess IPC"
 +msgstr ""
 +
 +#: apt-pkg/contrib/fileutl.cc:1212
 +msgid "Failed to exec compressor "
 +msgstr ""
 +
 +#: apt-pkg/contrib/fileutl.cc:1309
++=======
+ #: apt-pkg/contrib/fileutl.cc:1147
+ msgid "Failed to create subprocess IPC"
+ msgstr ""
+ #: apt-pkg/contrib/fileutl.cc:1202
+ msgid "Failed to exec compressor "
+ msgstr ""
+ #: apt-pkg/contrib/fileutl.cc:1297
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "read, still have %llu to read but none left"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:1398 apt-pkg/contrib/fileutl.cc:1420
++=======
+ #: apt-pkg/contrib/fileutl.cc:1384 apt-pkg/contrib/fileutl.cc:1406
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "write, still have %llu to write but couldn't"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:1736
++=======
+ #: apt-pkg/contrib/fileutl.cc:1681
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Problem closing the file %s"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:1748
++=======
+ #: apt-pkg/contrib/fileutl.cc:1693
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Problem renaming the file %s to %s"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:1759
++=======
+ #: apt-pkg/contrib/fileutl.cc:1704
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Problem unlinking the file %s"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/contrib/fileutl.cc:1774
++=======
+ #: apt-pkg/contrib/fileutl.cc:1717
++>>>>>>> upstream/debian/sid
  msgid "Problem syncing the file"
  msgstr ""
  
@@@ -2539,17 -2582,17 +2722,29 @@@ msgid "
  "The package %s needs to be reinstalled, but I can't find an archive for it."
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/algorithms.cc:1228
++=======
+ #: apt-pkg/algorithms.cc:1234
++>>>>>>> upstream/debian/sid
  msgid ""
  "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by "
  "held packages."
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/algorithms.cc:1230
 +msgid "Unable to correct problems, you have held broken packages."
 +msgstr ""
 +
 +#: apt-pkg/algorithms.cc:1580 apt-pkg/algorithms.cc:1582
++=======
+ #: apt-pkg/algorithms.cc:1236
+ msgid "Unable to correct problems, you have held broken packages."
+ msgstr ""
+ #: apt-pkg/algorithms.cc:1588 apt-pkg/algorithms.cc:1590
++>>>>>>> upstream/debian/sid
  msgid ""
  "Some index files failed to download. They have been ignored, or old ones "
  "used instead."
@@@ -2655,14 -2698,14 +2850,25 @@@ msgstr "
  #. TRANSLATOR: The first placeholder is a package name,
  #. the other two should be copied verbatim as they include debug info
  #: apt-pkg/pkgcachegen.cc:218 apt-pkg/pkgcachegen.cc:228
++<<<<<<< HEAD
 +#: apt-pkg/pkgcachegen.cc:294 apt-pkg/pkgcachegen.cc:325
 +#: apt-pkg/pkgcachegen.cc:333 apt-pkg/pkgcachegen.cc:375
 +#: apt-pkg/pkgcachegen.cc:379 apt-pkg/pkgcachegen.cc:396
 +#: apt-pkg/pkgcachegen.cc:406 apt-pkg/pkgcachegen.cc:410
 +#: apt-pkg/pkgcachegen.cc:414 apt-pkg/pkgcachegen.cc:435
 +#: apt-pkg/pkgcachegen.cc:477 apt-pkg/pkgcachegen.cc:517
 +#: apt-pkg/pkgcachegen.cc:525 apt-pkg/pkgcachegen.cc:556
 +#: apt-pkg/pkgcachegen.cc:570
++=======
+ #: apt-pkg/pkgcachegen.cc:294 apt-pkg/pkgcachegen.cc:321
+ #: apt-pkg/pkgcachegen.cc:334 apt-pkg/pkgcachegen.cc:376
+ #: apt-pkg/pkgcachegen.cc:380 apt-pkg/pkgcachegen.cc:397
+ #: apt-pkg/pkgcachegen.cc:405 apt-pkg/pkgcachegen.cc:409
+ #: apt-pkg/pkgcachegen.cc:413 apt-pkg/pkgcachegen.cc:434
+ #: apt-pkg/pkgcachegen.cc:473 apt-pkg/pkgcachegen.cc:511
+ #: apt-pkg/pkgcachegen.cc:518 apt-pkg/pkgcachegen.cc:549
+ #: apt-pkg/pkgcachegen.cc:563
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Error occurred while processing %s (%s%d)"
  msgstr ""
@@@ -2683,26 -2726,26 +2889,47 @@@ msgstr "
  msgid "Wow, you exceeded the number of dependencies this APT is capable of."
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/pkgcachegen.cc:577
++=======
+ #: apt-pkg/pkgcachegen.cc:570
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Package %s %s was not found while processing file dependencies"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/pkgcachegen.cc:1150
++=======
+ #: apt-pkg/pkgcachegen.cc:1199
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Couldn't stat source package list %s"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/pkgcachegen.cc:1238 apt-pkg/pkgcachegen.cc:1342
 +#: apt-pkg/pkgcachegen.cc:1348 apt-pkg/pkgcachegen.cc:1505
 +msgid "Reading package lists"
 +msgstr ""
 +
 +#: apt-pkg/pkgcachegen.cc:1255
 +msgid "Collecting File Provides"
 +msgstr ""
 +
 +#: apt-pkg/pkgcachegen.cc:1447 apt-pkg/pkgcachegen.cc:1454
++=======
+ #: apt-pkg/pkgcachegen.cc:1287 apt-pkg/pkgcachegen.cc:1391
+ #: apt-pkg/pkgcachegen.cc:1397 apt-pkg/pkgcachegen.cc:1554
+ msgid "Reading package lists"
+ msgstr ""
+ #: apt-pkg/pkgcachegen.cc:1304
+ msgid "Collecting File Provides"
+ msgstr ""
+ #: apt-pkg/pkgcachegen.cc:1496 apt-pkg/pkgcachegen.cc:1503
++>>>>>>> upstream/debian/sid
  msgid "IO Error saving source cache"
  msgstr ""
  
@@@ -2715,73 -2758,73 +2942,122 @@@ msgstr "
  msgid "MD5Sum mismatch"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:870 apt-pkg/acquire-item.cc:1870
 +#: apt-pkg/acquire-item.cc:2013
 +msgid "Hash Sum mismatch"
 +msgstr ""
 +
 +#: apt-pkg/acquire-item.cc:1381
++=======
+ #: apt-pkg/acquire-item.cc:870 apt-pkg/acquire-item.cc:1876
+ #: apt-pkg/acquire-item.cc:2019
+ msgid "Hash Sum mismatch"
+ msgstr ""
+ #: apt-pkg/acquire-item.cc:1377
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid ""
  "Unable to find expected entry '%s' in Release file (Wrong sources.list entry "
  "or malformed file)"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:1397
++=======
+ #: apt-pkg/acquire-item.cc:1393
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Unable to find hash sum for '%s' in Release file"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:1439
 +msgid "There is no public key available for the following key IDs:\n"
 +msgstr ""
 +
 +#: apt-pkg/acquire-item.cc:1477
++=======
+ #: apt-pkg/acquire-item.cc:1435
+ msgid "There is no public key available for the following key IDs:\n"
+ msgstr ""
+ #: apt-pkg/acquire-item.cc:1473
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid ""
  "Release file for %s is expired (invalid since %s). Updates for this "
  "repository will not be applied."
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:1499
++=======
+ #: apt-pkg/acquire-item.cc:1495
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Conflicting distribution: %s (expected %s but got %s)"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:1532
++=======
+ #: apt-pkg/acquire-item.cc:1525
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid ""
 -"An error occurred during the signature verification. The repository is not "
 +"A error occurred during the signature verification. The repository is not "
  "updated and the previous index files will be used. GPG error: %s: %s\n"
  msgstr ""
  
  #. Invalid signature file, reject (LP: #346386) (Closes: #627642)
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:1542 apt-pkg/acquire-item.cc:1547
++=======
+ #: apt-pkg/acquire-item.cc:1535 apt-pkg/acquire-item.cc:1540
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "GPG error: %s: %s"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:1646
++=======
+ #: apt-pkg/acquire-item.cc:1652
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid ""
  "I wasn't able to locate a file for the %s package. This might mean you need "
  "to manually fix this package. (due to missing arch)"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:1705
++=======
+ #: apt-pkg/acquire-item.cc:1711
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid ""
  "I wasn't able to locate a file for the %s package. This might mean you need "
  "to manually fix this package."
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:1764
++=======
+ #: apt-pkg/acquire-item.cc:1770
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid ""
  "The package index files are corrupted. No Filename: field for package %s."
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/acquire-item.cc:1862
++=======
+ #: apt-pkg/acquire-item.cc:1868
++>>>>>>> upstream/debian/sid
  msgid "Size mismatch"
  msgstr ""
  
@@@ -2897,22 -2940,22 +3173,38 @@@ msgstr "
  msgid "Source list entries for this disc are:\n"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/indexcopy.cc:236 apt-pkg/indexcopy.cc:880
++=======
+ #: apt-pkg/indexcopy.cc:236 apt-pkg/indexcopy.cc:774
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Wrote %i records.\n"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/indexcopy.cc:238 apt-pkg/indexcopy.cc:882
++=======
+ #: apt-pkg/indexcopy.cc:238 apt-pkg/indexcopy.cc:776
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Wrote %i records with %i missing files.\n"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/indexcopy.cc:241 apt-pkg/indexcopy.cc:885
++=======
+ #: apt-pkg/indexcopy.cc:241 apt-pkg/indexcopy.cc:779
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Wrote %i records with %i mismatched files\n"
  msgstr ""
  
++<<<<<<< HEAD
 +#: apt-pkg/indexcopy.cc:244 apt-pkg/indexcopy.cc:888
++=======
+ #: apt-pkg/indexcopy.cc:244 apt-pkg/indexcopy.cc:782
++>>>>>>> upstream/debian/sid
  #, c-format
  msgid "Wrote %i records with %i missing files and %i mismatched files\n"
  msgstr ""
index ff60d64a34889e63909b7e756c3d2d2252c154c6,a8d191d0e332d261a6e603e4d70c02afe5e73fff..dc17d49912a23b0cd10b1341e1e9f5c9eaf6f3f0
@@@ -374,13 -387,43 +391,47 @@@ int main(int const argc, const char * a
        return 2;
     }
  
 -   std::clog << "Serving ANY file on port: " << port << std::endl;
 -
+    FileFd pidfile;
+    if (_config->FindB("aptwebserver::fork", false) == true)
+    {
+       std::string const pidfilename = _config->Find("aptwebserver::pidfile", "aptwebserver.pid");
+       int const pidfilefd = GetLock(pidfilename);
+       if (pidfilefd < 0 || pidfile.OpenDescriptor(pidfilefd, FileFd::WriteOnly) == false)
+       {
+        _error->Errno("aptwebserver", "Couldn't acquire lock on pidfile '%s'", pidfilename.c_str());
+        _error->DumpErrors(std::cerr);
+        return 3;
+       }
+       pid_t child = fork();
+       if (child < 0)
+       {
+        _error->Errno("aptwebserver", "Forking failed");
+        _error->DumpErrors(std::cerr);
+        return 4;
+       }
+       else if (child != 0)
+       {
+        // successfully forked: ready to serve!
+        std::string pidcontent;
+        strprintf(pidcontent, "%d", child);
+        pidfile.Write(pidcontent.c_str(), pidcontent.size());
+        if (_error->PendingError() == true)
+        {
+           _error->DumpErrors(std::cerr);
+           return 5;
+        }
+        std::cout << "Successfully forked as " << child << std::endl;
+        return 0;
+       }
+    }
 +   if (simulate_broken_server) {
 +      std::clog << "Simulating a broken web server that return nonsense "
 +                   "for all querries" << std::endl;
 +   } else {
 +      std::clog << "Serving ANY file on port: " << port << std::endl;
 +   }
     listen(sock, 1);
     /*}}}*/
  
               continue;
            }
  
-           else if (RealFileExists(filename) == true) {
 +          if (simulate_broken_server == true) {
 +             std::string data("ni ni ni\n");
 +             addDataHeaders(headers, data);
 +             sendHead(client, 200, headers);
 +             sendData(client, data);
++               continue;
 +          }
++
+           // string replacements in the requested filename
+           ::Configuration::Item const *Replaces = _config->Tree("aptwebserver::redirect::replace");
+           if (Replaces != NULL)
+           {
+              std::string redirect = "/" + filename;
+              for (::Configuration::Item *I = Replaces->Child; I != NULL; I = I->Next)
+                 redirect = SubstVar(redirect, I->Tag, I->Value);
+              redirect.erase(0,1);
+              if (redirect != filename)
+              {
+                 sendRedirect(client, 301, redirect, *m, sendContent);
+                 continue;
+              }
+           }
+           ::Configuration::Item const *Overwrite = _config->Tree("aptwebserver::overwrite");
+           if (Overwrite != NULL)
+           {
+              for (::Configuration::Item *I = Overwrite->Child; I != NULL; I = I->Next)
+              {
+                 regex_t *pattern = new regex_t;
+                 int const res = regcomp(pattern, I->Tag.c_str(), REG_EXTENDED | REG_ICASE | REG_NOSUB);
+                 if (res != 0)
+                 {
+                    char error[300];
+                    regerror(res, pattern, error, sizeof(error));
+                    sendError(client, 500, *m, sendContent, error);
+                    continue;
+                 }
+                 if (regexec(pattern, filename.c_str(), 0, 0, 0) == 0)
+                 {
+                     filename = _config->Find("aptwebserver::overwrite::" + I->Tag + "::filename", filename);
+                     if (filename[0] == '/')
+                        filename.erase(0,1);
+                     regfree(pattern);
+                     break;
+                 }
+                 regfree(pattern);
+              }
+           }
+           // deal with the request
+           if (RealFileExists(filename) == true)
+           {
               FileFd data(filename, FileFd::ReadOnly);
               std::string condition = LookupTag(*m, "If-Modified-Since", "");
-              if (condition.empty() == false) {
+              if (condition.empty() == false)
+              {
                  time_t cache;
                  if (RFC1123StrToTime(condition.c_str(), cache) == true &&
-                     cache >= data.ModificationTime()) {
+                       cache >= data.ModificationTime())
+                 {
                     sendHead(client, 304, headers);
                     continue;
                  }
Simple merge