]> git.saurik.com Git - apt.git/commitdiff
add Source-Version field for EDSP
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 7 Sep 2015 13:05:00 +0000 (15:05 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 14 Sep 2015 13:22:18 +0000 (15:22 +0200)
The syntax of "Source" is different in EDSP compared to the the field of
the same name in 'the rest' of Debian, so documented this accordingly
and send the version as a new field.

apt-pkg/edsp.cc
doc/external-dependency-solver-protocol.txt
test/integration/test-external-dependency-solver-protocol

index db38f588f185a839406c91b0a7e780f91eb864fc..225d86de0a873e66d8f2ab631d5a91f250ac5937 100644 (file)
@@ -48,6 +48,7 @@ static void WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::Pkg
    fprintf(output, "Source: %s\n", Ver.SourcePkgName());
    fprintf(output, "Architecture: %s\n", Ver.Arch());
    fprintf(output, "Version: %s\n", Ver.VerStr());
+   fprintf(output, "Source-Version: %s\n", Ver.SourceVerStr());
    if (Pkg.CurrentVer() == Ver)
       fprintf(output, "Installed: yes\n");
    if (Pkg->SelectedState == pkgCache::State::Hold ||
index 14e9528c8469bf588f28cef30a9b5af3592552b3..5757991a835af14e590cb83d10710a70a58d8d0f 100644 (file)
@@ -227,6 +227,12 @@ field. The following fields are supported in package stanzas:
   Release file entry (Origin, Label, Codename, etc.) in the format of
   APT_PREFERENCES(5).
 
+- **Source:** (optional) The name of the source package the binary
+  package this record is for was built from.
+  This field does NOT include the version of the source package unlike
+  the Source field in the dpkg database. The version is optionally
+  available in the **Source-Version:** field.
+
 
 ### Answer
 
index 15944da9dae93274e342adf32ffebaffb5567d0b..5d5b1c7353e07970da0983a2a368c247e951af61 100755 (executable)
@@ -92,6 +92,7 @@ testsuccessequal 'Package: stuff
 Source: stuff
 Architecture: all
 Version: 1
+Source-Version: 1
 Installed: yes
 APT-ID: 2
 Priority: optional