_error->Error(_("Malformed stanza %u in source list %s (URI parse)"),i,Fd.Name().c_str());
return false;
}
+
+ string Enabled = Tags.FindS("Enabled");
+ if (Enabled.size() > 0 && StringToBool(Enabled) == false)
+ return true;
// Define external/internal options
const char* option_deb822[] = {
<literallayout>
Type: deb
URI: http://example.com
- Suites: stable
+ Suites: stable testing
Sections: component1 component2
Description: short
long long long
URI: http://example.com
Suites: stable
Sections: component1 component2
- [option1]: [option1-value]
+ Enabled: no
Description: short
long long long
+ [option1]: [option1-value]
</literallayout>
</para>
testequalwithmsg "Invalid deb822 sources.list file gives proper error" "E: Malformed stanza 0 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (URI parse)
E: The list of sources could not be read." aptget update --print-uris
+# with Enabled: false
+echo "$BASE" > $SOURCES
+echo "Enabled: no" >> $SOURCES
+testempty aptget update --print-uris