Ansgar has just told me about Contents-sources.gz. Wow! But this has
apparently existed for years and I never knew. This bug report is
about the fact that it is rather harder to use than would be ideal.
The README.md.gz says
- The "-a" option cannot be used with "source" or "udeb-$ARCH".
Please use the new "--index-names" option. Remember to
configure APT to download the extra Contents files.
This is enough of a hint to find some things, I guess, but it would be
nice if:
* dpkg-reconfigure apt-file were able to edit
/etc/apt/apt.conf.d/50apt-file.conf
(or maybe there would be some other way to easily do this).
* apt-file -a source, or apt-file --source, or something,
worked. Experimenting, I discover that the syntax I wantedd was
--index-names=dsc
Thanks,
Ian.
Ian Jackson: Thanks for reporting this bug. :) I can appreciate those suggestions from a user perspective. However, from a maintainer perspective, I do not want all the trouble and issues of having to maintain maintscripts, debconf prompts, etc. But we can certainly improve the situation despite of that. As I understand you, the primary key issue is finding the index names. What do you think of a "list-indices" command a la: """ $ apt-file list-indices +-----------------+-----------------------------+ | Index Name (-I) | DefaultEnabled (Apt config) | +-----------------+-----------------------------+ | deb | <unset> | | udeb | false | | deb-legacy | <unset> | | dsc | false | +-----------------+-----------------------------+ """ (See attached patch for a prototype) Do you think that would have solved your issue? Thanks, ~Niels
Niels Thykier writes ("Re: Bug#904678: dpkg-reconfigure apt-file ought to give me sources contents"):
Mmm.
That helps, but I think documentation improvements are also needed.
This is a good idea.
I still want enabling this feature to be easier. How about a
providing a command which edits /etc/apt/apt.conf.d/50apt-file.conf to
enable the sources contents ? And, presumably, also runs apt update.
Thanks,
Ian.
Ian Jackson: Certainly. Concrete pointers/ideas are welcome. :) Ok, will add it. :) Exact command/action name pending the next section. IMO, the APT config format is too flexible to be trivial to edit in general with more corner cases than I expect I will get right. But I suppose we could make apt-file generate a 60apt-file-auto.conf using a subset of the format (apt-config dump) and with comments to encourage people to stick with that format. The separate file also has the advantage of avoiding "gratuitous conffile prompts" for people that just enabled the indices but are otherwise happy with the defaults. Thanks, ~Niels
Hi Ian, I just updated apt-file/3.2 with the list-indices. I am still hoping for some pointers on where / what you would to see the documentation improved. You are almost certainly right but I am the wrong person to spot where it is and what is missing (it has all become "obvious" to me after having worked with this). This is now implemented. I also added a column that tells you if a given index has data. No progress here. I was getting stuck, so I preferred getting an incremental improvement out rather than staying stuck. Thanks, ~Niels