[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#825293: apt: please add support for Contents-udeb-* files



Control: tags -1 moreinfo

Cyril Brulebois:
> Package: apt
> Version: 1.3~exp1
> Severity: important
> 
> [ debian-boot@ and apt-file@ people in x-d-cc. ]
> 
> Hi,
> 
> apt-file now relies on apt/apt-get indextargets to download/list
> Contents files, and Contents-udeb-* files are missing at the moment.
> 
> Tracing this down into apt, it seemed GetIndexTargets needed a few
> changes to get the proper filenames. AFAICT it's important to have both
> MetaKey and ShortDesc to match reality, given the 4th parameter passed
> to the Indextarget sets the URI based on the MetaKey, which is then used
> to return the filename used in DoIndexTargets (cmdline/apt-get.cc).
> 
> I'm entirely unsure this is the right place/way to patch those things,
> but that seems to work for all intents and purposes:
> 
>     (sid-amd64-devel)kibi@wodi:~/hack/apt.git$ apt-file search efivars.ko|grep -- -di:
>     efi-modules-4.5.0-2-amd64-di: /lib/modules/4.5.0-2-amd64/kernel/drivers/firmware/efi/efivars.ko
> 
> I'm not sure about the following parts, but I suppose d-i is special
> enough that people having “main/debian-installer” bits in their
> sources.list shouldn't be too shocked by possible inconsistencies…
> 
>     [...]
> 
> Thanks for considering.
> 
> 
> KiBi.
> 

Hi,

The apt-file udeb search seems to work fine for me after three steps:

 * Enable the udeb fetching
   - e.g. edit /etc/apt/apt.conf.d/50apt-file.conf
   - Find "deb::Contents-udeb" and set its "DefaultEnabled" to true

 * Run apt update (or apt-file update)

 * Pass -I udeb when doing search in the udeb Contents
   - apt-file search -I udeb efivars.ko
   - The implicit default value for -I being "deb" and therefore the
     regular Contents files

(Admittedly, I was using apt/1.2.12, but I doubt they have made a
serious regression here).

This should also group the indices (as output under apt-get
indextargets) as expected, namely:

  Created-By: Contents-udeb
  Identifier: Contents-udeb

Both are indeed values that apt creates itself and exposes - currently
apt-file uses "Created-By", but it will soon use "Identifier" (waiting
for apt/1.3 in unstable as I recall).  The difference being that you can
"choose" the Identifier, so you can have udebs being part of the default
search result for apt-file (by setting "Identifier" to "Contents-deb").

Thanks,
~Niels



Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: