Rich Freeman on 24 Mar 2011 05:41:01 -0700

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

Re: [PLUG] Linux and package managers/repos

On Thu, Mar 24, 2011 at 4:47 AM, JP Vossen <> wrote:
> Having said that, some of it *is* the technology, since the package system
> knows what files and dirs it installed and it can remove them. That does not
> cover cases where the program creates new files or dirs unilaterally, but
> it's still better than the old Windows, sure stick DLLs anywhere method.
>  And yes, they've gotten a lot better about that, since XP or so...

Yup, I think the biggest single inprovement Windows could make to
maintainability would be to take a page from what most linux distros
try to do (imperfectly):

1.  A software package is contained entirely in one directory tree
under "Program Files" or whatever, and has one or two defined areas to
store system-wide or user-specific configuration (like a registry

2.  A software package can write to neither of those places.

3.  When it installs the software package can provide the OS with a
bunch of files to install, and it will do so (after confirming with
the user that this is OK), and initial system-wide state and a
template for new user-specific configuration.

4.  The OS will provide standard APIs for an app to modify system-wide
or user-specific settings.  The OS will enforce that all settings stay
properly contained.  Obviously system-wide changes may require some
privilege mechanism to manipulate, completely handled by the OS.

5.  When it is time to uninstall the software package can do things
like update license servers or whatever, but all the cleanup/etc is up
to the OS.

Some of these elements are enforced by typical linux PMs.  The main
issues I see on linux are that apps manage their own settings and
write to arbitrary world/user-writable locations, and sometimes even
group-writable areas under /usr/share/...  This makes true clean-up
difficult.  Android would be an example of an OS that pretty-much does
everything in 1-5, except that it is single-"user" (where user is
defined as a human, not an OS entity).  Android apps might or might
not be able to leave some mess if they are able to write to the SD
card (or locations on the network).

One thing I will also add is that even when packages are able for
whatever reason to go putting files in non-ideal places, many PMs have
some mechanism of detecting these files and removing them (if you're

I know that Gentoo at least has a database of every file installed by
every package, along with timestamps and hashes.  When removing
packages the PM will remove the file if it hasn't changed.  In fact,
the Gentoo PM installs new versions of packages before removing old
ones, and uses this logic to make this happen safely.

>> Ironically, I'd actually argue that Windows is better at managing packages
>> that
>> do not come from Windows.
> OK, interesting point.  That's part of why I argue to stay inside the
> package system.  And almost anything you want is already in there. But...
>  When it isn't, it does get ugly.

Yup, distros need to provide more graceful solutions to this.

I know that some tools exist on Gentoo for creating packages out of
file trees for single-use so that they are at least managed.  That is,
you manually install a package to /tmp/someplace (so that the binaries
end up in /tmp/someplace/usr/bin or whatever), and then it snapshots
this, installs it, and then manages it (minus automatic

I have no illusions that linux distros have it perfect.  The fact that
they control what goes in sometimes leads them to not try to provide
workarounds for user-deployed packages.

Both Windows and Linux distros would do well to learn from the
strengths of the other.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --