[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#272557: provide NotAutomatic option



Hi,
Currently mini-dak uses apt-ftparchive and specifies
-o APT::FTPArchive::Release::NotAutomatic=yes for experimental, but this
has no effect, so any available experimental packages get pulled in
unless priorities are manually configured locally. The attached patch
should fix this (compiled but not tested).

Commit 8279242 also broke the documentation build, so I've attached a
fix for that as well.

Regards,
James
>From c7b64fa89dd1c5521bf94a1e2f2c60676772add6 Mon Sep 17 00:00:00 2001
From: James Clarke <jrtc27@jrtc27.com>
Date: Sat, 29 Oct 2016 15:12:02 +0100
Subject: [PATCH 1/2] apt-ftparchive: Support NotAutomatic and
 ButAutomaticUpgrades fields

Closes: #272557
---
 doc/apt-ftparchive.1.xml | 1 +
 ftparchive/writer.cc     | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/apt-ftparchive.1.xml b/doc/apt-ftparchive.1.xml
index 705f416..95d7876 100644
--- a/doc/apt-ftparchive.1.xml
+++ b/doc/apt-ftparchive.1.xml
@@ -106,6 +106,7 @@
      e.g. <literal>APT::FTPArchive::Release::Origin</literal>. The supported fields
      are <literal>Origin</literal>, <literal>Label</literal>, <literal>Suite</literal>,
      <literal>Version</literal>, <literal>Codename</literal>, <literal>Date</literal>,
+     <literal>NotAutomatic</literal>, <literal>ButAutomaticUpgrades</literal>,
      <literal>Valid-Until</literal>, <literal>Signed-By</literal>, <literal>Architectures</literal>,
      <literal>Components</literal> and <literal>Description</literal>.</para></listitem>
 
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index 018cf00..0bfe6ba 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -1019,7 +1019,9 @@ ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) :
    Fields["Signed-By"] = "";
    if (_config->FindB("APT::FTPArchive::DoByHash", false) == true)
       Fields["Acquire-By-Hash"] = "true";
-   
+    Fields["NotAutomatic"] = "";
+    Fields["ButAutomaticUpgrades"] = "";
+
    for(map<string,string>::const_iterator I = Fields.begin();
        I != Fields.end();
        ++I)
-- 
2.9.3

>From 1b2a5d60d5a1c0a355ec665c61ad16cf9481aee6 Mon Sep 17 00:00:00 2001
From: James Clarke <jrtc27@jrtc27.com>
Date: Sat, 29 Oct 2016 15:34:42 +0100
Subject: [PATCH 2/2] Fix invalid XML in German translation

---
 doc/po/de.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/po/de.po b/doc/po/de.po
index 853725a..36befc7 100644
--- a/doc/po/de.po
+++ b/doc/po/de.po
@@ -5607,7 +5607,7 @@ msgid ""
 msgstr ""
 "Paketaktionszeilen bestehen in Version 2 aus fünf Feldern: Paketname (ohne "
 "Architekturvoraussetzung, sogar wenn fremd), alte Version, Richtung der "
-"Versionsänderung (»&lt« für Upgrades, »&gt« für Downgrades, »=« für keine "
+"Versionsänderung (»&lt;« für Upgrades, »&gt;« für Downgrades, »=« für keine "
 "Änderung), neue Version, Aktion. Die Versionsfelder sind »-« für gar keine "
 "Version (zum Beispiel, wenn ein Paket zum ersten Mal installiert wird; keine "
 "Version wird als älter als jede echte Version angesehen, daher wird ein "
-- 
2.9.3


Reply to: