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

Re: Writing a Spacewalk plugin for Apt-Get

On 02/17/2011 08:55 AM, Michael Vogt wrote:

Hello Michael,

Thanks for your response.

> The sources.list is read a lot and often by non-root processes (that
> just check the status of the system like update-notifier). So hooking
> into that sounds not like the ideal solution. 

Hm, that could be a problem.

The behavior of non-root processes reading sources.list will depend on a
way how they achieve that (which libapt function they use). And where
that new '*-Invoke' is to be inserted.

Maybe there is a point, which may be suitable for it. Now, for a testing
purposes I've put my code into the:


And I haven't experienced any problems yet. I'll try to play with
update-notifier and other components.

>                                               The next problem with
> that is that when you add "bar foo xxx" apt will have no package
> information for those, so you will have to apt-get update (see below).

Yes, Apt will not take into account new items added to sources
immediately, while it will omit items _removed_ from sources, which
might become quite important when resolving dependencies.

> Would simply using APT::Update::Pre-Invoke help? To only refresh the
> sources.list entries when the info is actually refreshed?

APT::Update::Pre-Invoke cannot be used.

This hook is called before the update action, but after the sources.list
is processed. This would only force people to run `apt-get update` twice
in row. So this solution would not work smooth with other programs using

I'll do an investigation during a weekend. And report back, when I do
find acceptable outcome.

Thanks for Your help,

Šimon Lukašík, xlukas08
RHCSA,RHCE #110-002-490

Reply to: