On 05/04/12 18:45, Andrei POPESCU wrote:
> On Jo, 05 apr 12, 09:05:53, Scott Ferguson wrote:
>> On 05/04/12 04:24, Martin Steigerwald wrote:
>>>
>>> It would be nice if I could now whether I installed a packages manually 
>>> via dpkg -i and m-a a-i, well which uses dpkg, it whether apt-get or 
>>> aptitude installed it, i.e. whether I installed the package via a package 
>>> manager or a package repository manager.
>>
>> I agree, that would be a very useful ability. I've recently had to deal
>> with a, um, "differently" designed network where the boxes mixed
>> releases and had a lot of self-built packages. Such a capability would
>> have saved us considerable time.
>> It's possible it can already be done (by someone knowledgeable), but I
>> don't see anything in dpkg status or logs that hold that info.
>>
>> Perhaps just alias some logging to dpkg?
> 
> Why dpkg?

Because all packages are installed through dpkg :-D
ie. that would allow the log to show whether dpkg was called directly or
not.
At least that was my initial "thought"[*1]. But I suspect it'll only
work if using a package cacher or proxy logging (and it turns out to be
a waste of time then).


> Since all packages are installed through dpkg I think a 
> possible implementation would mean diff'ing the list of installed 
> packages with the list of packages installed via apt-get/aptitude. 

Sort of. My original idea was that if dpkg was called directly then a
repository was being used - turns out to be wrong[*1], but the following
scenario might work[*2].
I could query a list of installed packages against
apt-cacher/packages[*3], as those package managers always result in a
file being added to the package cache there.
apt-cacher/private might be used to tell me which repository they came
from.
apt-show-versions might then be used to show whether they're still
available.

> 
> Kind regards,
> Andrei

[*1] I spent an entertaining hour this morning forcing an install of
xbmc debian packages onto Squeeze - to get around a broken system I was
forced to (pun there) use dpkg directly (even though they came from a
repository). So logging what called dpkg is unnecessary - the list of
installed packages minus the list of corresponding packages in
apt-cacher should show custom/non-repository packages. If those
(remaining) packages aren't beneath linux/debian/$release/packages then
I've stuffed up somewhere.

[*2] Provided my total lack of thought, planning, and research hasn't
overlooked an existing system that works better.
[*3] The office and client networks have "software servers" that include
an installation of apt-cacher, even when a local mirror is used.


Kind regards

-- 
Iceweasel/Firefox/Chrome/Chromium/Iceape/IE extensions for finding
answers to questions about Debian:-
https://addons.mozilla.org/en-US/firefox/collections/Scott_Ferguson/debian/


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f7d68f3.9060...@gmail.com

Reply via email to