Conversation
|
One review note on the deb822 URI path. Skipping S = SubstVar(S, "$(ARCH)", _config->Find("APT::Architecture"));
S = SubstVar(S, "$(VERSION)", _config->Find("APT::DistroVersion"));
if (URI[URI.size() - 1] != '/') URI += '/';
Suggested, keeping the multi-value semantics: auto parts = FindMultiValue(Sec, "URIs");
for (auto &p : parts) {
p = SubstVar(p, "$(ARCH)", _config->Find("APT::Architecture"));
p = SubstVar(p, "$(VERSION)", _config->Find("APT::DistroVersion"));
}
rec.URI = APT::String::Join(parts, " ");I left trailing-slash normalisation out: apt gives "suite must end with a slash" its own exact-path meaning, and I am not sure adding it here is correct. Caveat on how I checked this: I reproduced both code paths in Python from the C++. I could not build or run the test suite (libapt is Debian-only, this is macOS), so I have not seen synaptic read a |
4b48ca6 to
3505e04
Compare
$(VERSION) came from apt-rpm's APT::DistroVersion, which Debian apt never sets or expands. Debian's build explicitly conflicts with librpm-dev, so nothing has used it in years; apt only knows $(ARCH) here. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Lets use apts GetListOfFilesInDir() instead of our own version of it. Also add the beginging of tests around this which we will need for the deb822 reading (gtest based). Thanks to tzh476 and aybanda, who inspired this via PR#274 and PR#150.
To read apt's deb822 source records we now use libapt's pkgTagFile and parse into our own SourceRecords. However we start with read only support for now to keep the diff smaller. Thanks to tzh476 and aybanda for the work on this in PR #274 and PR #150. The test fixtures are taken from tzh476's tests in PR #274. Co-authored-by: Stephen Smith <tzh476@users.noreply.github.com>
To avoid confusion this adds a hint in the repostiory dialog that deb822 files are not editable yet. It also shows for one-line sources what file they belong to.
Now that we use meson it is probably better to provide some basic instructions as its not as well-known as autotools.
This PR adds some tweaks/work for the deb822 sources reading work in #274 and #150 and start with read-only support.
rsources: use libapt GetListOfFilesInDir instead of reimplmenting
Lets use apts GetListOfFilesInDir() instead of our own version
of it. Also add the beginging of tests around this which we will
need for the deb822 reading (gtest based).
Thanks to tzh476 and aybanda, who inspired this via PR#274 and
PR#150.
rsources: add a read-only version of deb822 parsing
To read apt's deb822 source records we now use libapt's pkgTagFile
and parse into our own SourceRecords. However we start with read
only support for now to keep the diff smaller.
Thanks to tzh476 and aybanda for the work on this in PR #274 and
PR #150. The test fixtures are taken from tzh476's tests in PR #274.
Co-authored-by: Stephen Smith tzh476@users.noreply.github.com
gtk: fix grayed out list view entries
gtk: add hint in rgrepositorywin.cc that deb822 is not
editable
To avoid confusion this adds a hint in the repostiory dialog that
deb822 files are not editable yet. It also shows for one-line
sources what file they belong to.