[elbe-devel] [PATCH v3] virtapt: fix apt paths
Volker Haspel
volker.haspel at linutronix.de
Wed Aug 15 13:48:25 CEST 2018
On Wed, 15 Aug 2018 12:36:15 +0200
Manuel Traut <manut at linutronix.de> wrote:
> using Dir to set the basepath and than work with relative paths doesn't
> work. So always set the full-path to avoid using hosts apt config.
>
> Signed-off-by: Manuel Traut <manut at linutronix.de>
Reviewed-by: Volker Haspel <volker.haspel at linutronix.de>
> ---
>
> changes since v1:
> * newly introduced patch
> changes since v2:
> * set etc to projectpath and don't set etc:apt twice
>
> elbepack/virtapt.py | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
> index 7f03d767..deac0e8a 100644
> --- a/elbepack/virtapt.py
> +++ b/elbepack/virtapt.py
> @@ -71,15 +71,16 @@ class VirtApt:
> apt_pkg.config.set("APT::Architectures", arch)
> apt_pkg.config.set("Acquire::http::Proxy::127.0.0.1", "DIRECT")
> apt_pkg.config.set("APT::Install-Recommends", "0")
> - apt_pkg.config.set("Dir", self.projectpath)
> + apt_pkg.config.set("Dir::Etc", self.projectpath)
> apt_pkg.config.set("APT::Cache-Limit", "0")
> apt_pkg.config.set("APT::Cache-Start", "32505856")
> apt_pkg.config.set("APT::Cache-Grow", "2097152")
> - apt_pkg.config.set("Dir::State", "state")
> - apt_pkg.config.set("Dir::State::status", "status")
> - apt_pkg.config.set("Dir::Cache", "cache")
> - apt_pkg.config.set("Dir::Etc", "etc/apt")
> - apt_pkg.config.set("Dir::Log", "log")
> + apt_pkg.config.set("Dir::State", os.path.join(self.projectpath, "state"))
> + apt_pkg.config.set("Dir::State::status", os.path.join(self.projectpath, "state/status"))
> + apt_pkg.config.set("Dir::Cache", os.path.join(self.projectpath, "cache"))
> + apt_pkg.config.set("Dir::Cache::archives", os.path.join(self.projectpath, "cache/archives"))
> + apt_pkg.config.set("Dir::Etc", os.path.join(self.projectpath, "etc/apt"))
> + apt_pkg.config.set("Dir::Log", os.path.join(self.projectpath, "log"))
> if noauth:
> apt_pkg.config.set("APT::Get::AllowUnauthenticated", "1")
> apt_pkg.config.set("Acquire::AllowInsecureRepositories", "1")
More information about the elbe-devel
mailing list