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

Bug#727799: apt-get not marking manual correctly and apt-mark showmanual also wrong



On Sun, Oct 27, 2013 at 8:39 PM, Jes Slow <cluelesscoder@gmail.com> wrote:
> If you look at your extended_states file, there's likely to be a few
> packages which have Auto-Installed: 0. These are manually installed, right?
> That's what apt-mark showmanual thinks anyway. Why are these there? If the
> intent is to only list packages which are automatically installed in
> extended_states, then you should remove that field and just make it a list
> of automatically installed packages. Don't see why there should be two
> different ways to indicate if a package is manually installed.

I don't have "Auto-Installed: 0" entries in that file …
And the file is actually cleaned up on each write, if the Auto-Installed flag
is false and no other flag present (<- preparing for future additions).
I suppose there is the possibility of bugs in the logic though as the logic
is a tad more complex than I say here.


> However, I don't think you should convert extended_states into a simple list
> of packages. There's a widespread impression that extended_states shows
> manually installed packages, as in things that the user really wanted to

I have no idea were you could get that idea from. Beside that we can write
whatever we want into this file – it is not supposed to be read by humans.
We have apt-mark to access and modify the information.
Reading/Writing the file by hand is tricky.


> install (and not dependences like foo-data or system installed; exceptions
> like these should be in the man page and are completely counterintuitive).
> Right now apt-mark showmanual shows probably hundreds of things I didn't
> take the time to install. I'm not the only one who notices that: see the
> comments to accepted answer on the page I referred to previously (on
> AskUbuntu actually) What's the reason for that?

You are asking a machine to be clever, but machines are idiots.

You might not have installed an Xserver, but the installer did because it
believes you need it and don't want it removed. The same goes for installing
'gnome' and marking everything 'gnome' depends on as manual because
users assume that removing just the (metapackage) 'gnome' will not
automatically also remove all the gnome applications they grow used to.

Then you follow a tutorial or you use one of those deceases like crappy
installerscripts from dubious sources which just 'apt-get install everything'.


> I'm getting the impression that the manually installed metadata is actually
> designed more for package maintenance and maintainers than for users who
> want to get a good idea of what they've done in the past. However, there's

Yes and no. The idea is to identify packages with it which surf no propose
anymore like libraries no application depends on anymore or all those
libraries and helpers an application depended on, which you have removed
in the meantime. Of course, to be useful this system should default on
playing safe hence you probably end up with more packages marked as manually
installed than really needed.

This is distinct from your usecase of getting to know which packages are
installed by you rather than some automated process. It might overlap at
times, but not always. The big problem you have to face is that it is
pretty hard to decide if you or software ordered an installation. Many
times its both. Example: An application which installs packages (for you)
to enable hardware support (for you). [do you see what I did here?]
Is this "auto" or "manually installed"?


> down the manifest of the distro's packages. It actually seems like the
> current set-up leaves an elegant opening for this: if something has the
> Auto-Installed: 0 in extended_states, it could be indicated as truly
> auto-installed, while the ones which aren't even listed in extended_states
> as auto-installed could be pseudo-manually installed (system installed plus
> things like foo-data).

First: An auto-installed packages has 'Auto-Installed: 1'.
Second: If you have no data, default to a safe option and this is here
"auto-installed: 0" (= manually installed) as it isn't removing anything.
(It has also historical reasons as this tracking wasn't implemented from
 the beginning and there was a time people cared about upgrades a lot).


> See 1, 2, 3, 4, 5. Going back a little further, there's a 2008 thread on
> ubuntuforums.com.

We try hard to not make it visible, but APT changes over time, so it might
not sound like much, but 2008 is like talking about the dark ages.
If it helps to get a perspective: I wasn't a contributor to APT back than
(actually, I was a fresh Linux greenhorn at that time) and auto-installed
was one of the new kids on the block.


The underlying question to most of the questions is:
How can I find out which packages I have to install after a fresh install
to get my old setup back.
It's a problem you don't have (partially) if you still value upgrades a lot.
And its a problem you can't solve by just looking what packages you have
installed yourself. The packages your distribution installed for you
in release A but not in release B (because they prefer something else now)
are just as important to know as the packages which got renamed in the
meantime. "chromium" wasn't always referring to a browser…


Best regards

David Kalnischkies


Reply to: