소스 검색

add Source-Version field for EDSP

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.
David Kalnischkies 11 년 전
부모
커밋
eed4639e3f
3개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      apt-pkg/edsp.cc
  2. 6 0
      doc/external-dependency-solver-protocol.txt
  3. 1 0
      test/integration/test-external-dependency-solver-protocol

+ 1 - 0
apt-pkg/edsp.cc

@@ -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 ||

+ 6 - 0
doc/external-dependency-solver-protocol.txt

@@ -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
 

+ 1 - 0
test/integration/test-external-dependency-solver-protocol

@@ -92,6 +92,7 @@ testsuccessequal 'Package: stuff
 Source: stuff
 Architecture: all
 Version: 1
+Source-Version: 1
 Installed: yes
 APT-ID: 2
 Priority: optional