On Debian, the GetFiles method only works when pkg is installed #118

Open
purpleidea opened this Issue Mar 11, 2016 · 11 comments

Projects

None yet

3 participants

@purpleidea

I'm hoping this isn't a weird bug in my code...

On Fedora-23, the GetFiles method returns useful data whether package is installed or not.
On Debian-8, it only seems to return data once the package is already installed...

If it's not me, then this is a bug :(
Can someone else confirm? Thanks,

James

@ximion
Collaborator
ximion commented Mar 11, 2016

This is not a bug but normal behavior - the information about not-installed files is simply not available on Debian systems.
Users can download the ~28MB file manually or enable automatic downloads if they need that data. It will never be available by default (for various reasons, the main one being download size).
So, unfortunately not a bug but expected behavior of APT.

@ximion ximion closed this Mar 11, 2016
@purpleidea

@ximion Yikes... Is there a way to trigger this download ahead of time, so that the method will work even when the package isn't installed? For example, apt-file update does have the file information, and getting it from there would be useful, to match parity with Fedora and other systems...

@purpleidea

Users can download the ~28MB file manually or enable automatic downloads

IOW, how do I do either of these things in Debian, and if I do them, will the GetFiles method work when the package is not installed?

@dantti
Collaborator
dantti commented Mar 13, 2016

Aptcc at time wont read data from apt file, it only read file list of
installed stuff, one need to implement that patches welcome :)
Em 11 de mar de 2016 9:08 PM, "James" notifications@github.com escreveu:

Users can download the ~28MB file manually or enable automatic downloads

IOW, how do I do either of these things in Debian, and if I do them, will
the GetFiles method work when the package is not installed?


Reply to this email directly or view it on GitHub
#118 (comment).

@ximion
Collaborator
ximion commented Mar 13, 2016

But you will never get that by default - that's not how Debian works ;-)
That said, patches welcome to consume the data if it's already available (= the user configured his system to have the data downloaded).

@purpleidea

@dantti okay, I will try to get someone to write the patch, since my c is not so good.

@ximion This all sounds fine. As long as nobody has any objections to patching this functionality, I think it would be quite great to have. Can we reopen the ticket please?

@purpleidea

@ximion How does the user:

(configured his system to have the data downloaded).

Eg: what apt commands or debian settings do i have to run/set?

@ximion
Collaborator
ximion commented Mar 13, 2016

On the upcoming Debian release (stretch or newer) installing apt-file will be enough.
For older releases I think you need to install apt-file and also ensure that apt-file update is run periodically.
Btw, something else: Why do you want that feature at all?

@purpleidea

On debian-8, I installed apt-file and updated the cache, but still I did not receive the packagelist with GetFiles until the package was installed.

As for why I want the feature, I will PM you a list of a WIP preview blog post explaining this. It's for https://github.com/purpleidea/mgmt Blog post should be out by tomorrow, and I will then paste it here for everyone.

@ximion ximion reopened this Mar 13, 2016
@purpleidea

Based on a nice discussion with @ximion, if we can get someone to write the aptcc parts so it can use apt-file and get this information to packagekit, this would be a valid feature, although he pointed out that there's a non-zero amount of technical work to accomplish it.

Here's hoping we can inspire someone to contribute this :) Thanks to everyone for their time.

@purpleidea

I've now published a blog post on why and how we need and use this feature: https://ttboj.wordpress.com/2016/03/14/automatic-edges-in-mgmt/ if anyone is interested.

To elaborate on this in the context of this issue, since we build the config management graph of resources before, we run each resource, if the pkg resource is set to be installed, we won't know the dependencies until after it runs. So it's a catch 22.

Unfortunately, only Debian users seem to suffer for this, as it works as expected in Fedora. Until then Debian users can still fully use this tool, but they just won't have automatic edges for packages.

Thanks for making it possible!

@purpleidea purpleidea referenced this issue in purpleidea/mgmt Mar 20, 2016
Open

package resource bugs #11

@ximion ximion added the enhancement label Jul 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment