---
name: "Cache::Apt::Config"
section: "3"
platform: "linux"
package: "libcache-apt-perl"
version: "0.12.0"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/Cache::Apt::Config"
---

# Cache::Apt::Config(3)

Configuration handler for apt-cross and related tools

## Name

Cache::Apt::Config - Configuration handler for apt-cross and related tools

## Description

Extensively modified portion of NorthernCross using only the Config and Lookup modules and exposing the package details using a dedicated struct.

## Copyright and Licence

- •

  ```
   Copyright (C) 2006, 2007  Neil Williams <codehelp@debian.org>
  ```

- •

  ```
   Copyright (c) 2006, 2007  Alexander Shishkin <alexander.shishkin@siemens.com>
  ```

```
 This package is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
```

## set\_download\_mode

Add Apt configuration options to the current configuration to set Apt::Get::Assume-Yes, Apt::Get::Print-URI, Apt::Get::Download-only ready to identify the location of files needing to be downloaded from apt sources.

## get\_cache\_architecture

Reimplemented from dpkg-cross to remove an extra dependency.

## check\_cache\_arch($arch)

Reimplemented from dpkg-cross to remove an extra dependency.

Checks that the supplied `$arch` is (or can be converted to) a DEB\_HOST\_GNU\_TYPE that is known to dpkg-architecture. Sets the module `$arch` variable as a side-effect.

returns the DPKG\_HOST\_GNU\_TYPE or undef

## set\_suite($suite)

Override the &get\_suite default to set a specific repository codename that must be supported by all sources in your sources.list.

## get\_sourceslist ()

Returns the name of the current sources list file.

## use\_mysources ($sources\_file)

Specify that the cache can only use the specified sources.list file instead of collating a complete set of sources from the system apt configuration.

## use\_hostsources

Remove the override and return to the default system sources.

## get\_suite

Logic to identify the current suite from apt-cache policy.

This comes from emdebian-tools - migrate to NorthernCross in due course.

## get\_cache\_apt\_version

Uses dpkg-query to retrieve the version string for the currently installed libcache-apt-perl package. Falls back to a default version if dpkg-query fails.
