View Single Post
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#8
Well, I cant seem to get the --cache command to work.

How it is supposed to work is that you evoke it like such:
Code:
aptly --cache --install some_package
# or
aplty --cache some_directory --install some_package
Supposedly, that will download your deb package to some_directory or ~/.config/aptly/cache if some_directory is omitted.

The equivalent in plain old apt-get is this:
Code:
apt-get -o dir::cache::archives="/home/user/.config/aptly/cache" install some_package
which runs fine.

I am trying to evoke it using python's subprocess:
Code:
command = ["apt-get", "-o", "dir::cache::archives="/home/user/.config/aptly/cache"", "install", "some_package"]

subprocess.call(command)
The problem is that I get the following error:
Code:
E: could not open lock file /var/cache/apt/" /home/user/.config/aptly/cache/" /lock - open (2 no such file or directory
I'm confused because no where in the code have I done any variable substitution for the /valr/cache/apt/" or assigned it explicitly. Am I missing something glaringly obvious?
__________________
aspidites | blog | aspidites@inbox.com