Live data from Hacker News

Introducing PackageManagement in Windows 10

blogs.technet.com

121–130 of 221 posts

Re: Introducing PackageManagement in Windows 10

#121

Earlier quoted context omitted.

Or rather, slipstream future updates to current downloads. E.g., if you're installing component X that has patches A, B, C, then perhaps you should get customers to download component X that is already in a patched state.

What I always wonder, while twiddling my thumbs during the interminable upgrade-reboot-upgrade cycle, is how many of these these updates will be overwritten by a later update. Am I wasting my time downloading multiple versions of the same file?

These upgrade-shortcuts could introduce a significant increase in testing complexity if you want ensure that you can go from any system version to the current version.

On the other hand, with the current system people upgrade from Windows 1.0 to 8 (e.g. https://www.youtube.com/watch?v=8WP7AkJo3OE).

Re: Introducing PackageManagement in Windows 10

#122
I was going to say, "Finally! They've gotten it right after all these years of sucking so hard as to be unusable on servers." But, I did some digging into the github for OneGet (https://github.com/OneGet/oneget)...

And, they haven't gotten it right. Windows package management still sucks so hard as to make the OS unusable on servers (and annoying as hell on the desktop). This is seemingly a simple-minded downloader, with none of the capabilities I would expect of a modern package manager. Sure, it's nice that it can download and install stuff from the command line (and it's idiotic that it's been so difficult to do that in the past), pulling from a variety of sources. But to imply that this is somehow comparable to apt or yum is disingenuous, at best. I'm guessing it's simply ignorance; Windows folks usually have no idea what they're missing (if they did, they couldn't possibly tolerate how bad it is).

I can find no mention of dependency resolution, for starters, which is the core reason apt and yum are magnificent. Nothing about querying for what files or commands are provided by which packages. Basic validation tools (i.e. if I uninstall or upgrade X, will Y break?), also seem to be missing.

In short: It's simply not a package manager in the sense we mean when we speak of apt or yum. "Lipstick on a pig" is a saying that might apply here.

Re: Introducing PackageManagement in Windows 10

#123

Earlier quoted context omitted.

That's the easiest way, but not the only way. Likewise, on Ubuntu you also often need build-essentials and various other dev libs manually installed.

Do we really want to compare "sudo apt-get install build-essentials" with installing all VS, Perl,Python etc... in Windows ? :)

Well, in some ways it's worse.

I'm not too familiar with linux, but a year or two ago, I was trying to set up a rails development environment on a Ubuntu VM. I had quite a few challenges along the way, but one of them that I recall that confounded me for an hour or so was that I needed to install build-essentials, which was not documented in the guide I was using, nor was it marked as a dependency in whatever package I was actually trying to install.

When you install Visual Studio, generally it automatically installs anything you're missing, or at least tells you how to do it.

Re: Introducing PackageManagement in Windows 10

#125

I was going to say, "Finally! They've gotten it right after all these years of sucking so hard as to be unusable on servers." But, I did some digging into the github for OneGet ( https://github.com/OneGet/oneget )... And, they haven't gotten it right. Windows package management still sucks so hard as to make the OS unusable on servers (and annoying as hell on the desktop). This is seemingly a simple-minded downloader…

Is application dependency management in windows normally a problem? Apart from the odd runtime, I expect Windows applications to be pretty much self contained, and not dependent on any system-wide libraries (which is a huge benefit I think).

For development it's a different story, there you can have several levels of dependencies, but there NuGet at least appears at least as powerful as similar options on other platforms.

Re: Introducing PackageManagement in Windows 10

#126
post #86

Perhaps I missed it, but the article doesn't mention this in any way: Windows ABSOLUTELY needs a way to go from 'Fresh Install' to 'Fully upgraded' with minimal interaction. Linux can do this: run `apt-get dist-upgrade` in Ubuntu, and you get all of the most recent updates. However, in Windows, you install 3 updates, restart, install 5 updates, restart, install 110 updates, restart....

An addendum to this is that Windows needs to restart way too often compared to Linux. When I apply my daily yum updates for CentOS, only kernel updates, which are very infrequent, require a reboot. Every time I do Windows Updates, I need to reboot. This is highly annoying and IMO makes Windows Server YYYY completely unsuitable for servers.

This might be the case if you run servers on single machines rather than in clusters. And if you are running servers on single instances, aren't you already giving yourself a SPOF? If you need a specific server to be running at all times it seems like you have a problem.

Re: Introducing PackageManagement in Windows 10

#127
post #51

Oh, wow. Please, can I get a decent command line now?

I use cygwin. I run cygwinsshd on localhost:22 and use Putty for my client. A lot of windows-specific gui commands won't work through the ssh layer, but will if you run the cygwin bash shell directly. (Maybe there's some way to get them to work over SSH but I have never had reason to try and figure it out). $ which nmap.exe /cygdrive/c/Program Files/Nmap/nmap.exe $ nmap.exe -PN -p 80,443 news.ycombinator.com | grep t…

Have you ever tried MobaXterm? I use that as my daily driver shell and am very happy with it! Both for ssh to remote boxes and as a local command prompt

http://mobaxterm.mobatek.net/

Re: Introducing PackageManagement in Windows 10

#128
post #92

Earlier quoted context omitted.

Different package managers make different design decisions that make them incompatible with each other without sacrifice. Guix/Nix focus heavily on reproducibility and not relying on any third party binaries. These features would have to be thrown away if it unified pip, npm, etc. because they make no such guarantees. Every package manager works different, and trying to accomadate all of them with a unifying tool wil…

> These features would have to be thrown away if it unified pip, npm, etc. because they make no such guarantees. Again I disagree. For example in this case, it would just mean that when installing from nix repos you get the reproducibility etc guarantees, installing from upstream repos would get you vanilla version and installing from OS repos would get you an integrated/patched version. But the installation process…

If we've any hope to unify package management, we need to get to the essence of what package management is. It's really quite simple though - it's the ability to say that one piece of software depends upon another, and to have a piece of software which can automatically resolve the dependencies (which form a DAG). To construct our DAG we need a list of nodes (the packages), and a list of edges (the dependencies of a package).

If we say that packages are basically just binary blobs of data (say, a .tar.*), then we might construct our database to identify (key) our package payloads. I'll use some pseudo pgsql for illustration purposes.

    CREATE TABLE packages
    (
        payload bytea NOT NULL,
        package_name character varying NOT NULL,
        CONSTRAINT pk_package PRIMARY KEY ("package_name")
    );

    CREATE TABLE package_dependency
    (
        dependant character varying NOT NULL,
        dependency character varying NOT NULL,

        CONSTRAINT package_dependency_dependant_dependency_key UNIQUE (dependant, dependency)

        CONSTRAINT package_dependency_dependant_fkey FOREIGN KEY (dependant)
            REFERENCES packages (package_name),
        CONSTRAINT package_dependency_dependency_fkey FOREIGN KEY (dependency)
            REFERENCES packages (package_name),

    );

Simple. But we're mising a bit here. We need to update software, so a name is not sufficient to identify a dependency. Lets add that.

    CREATE TABLE packages
    (
        payload bytea NOT NULL,
        package_name character varying NOT NULL,
        version integer NOT NULL,
        CONSTRAINT pk_package PRIMARY KEY (package_name, version)
    );

    CREATE TABLE package_dependency
    (
        dependant character varying NOT NULL,
        dependency character varying NOT NULL,
        dependant_version integer NOT NULL,
        dependency_version integer NOT NULL,

        CONSTRAINT package_dependency_pkey UNIQUE (dependant, dependency, dependant_version, dependency_version),

        CONSTRAINT package_dependency_dependant_fkey FOREIGN KEY (dependant, dependant_version)
            REFERENCES packages (package_name, version),
        CONSTRAINT package_dependency_dependency_fkey FOREIGN KEY (dependency, dependency_version)
            REFERENCES packages (package_name, version)
    );

Cool, now we have a composite key we've got sufficient information to idenfity a dependency right? Well no, we now have the problem that the same piece of software with the same version could be distributed by different vendors (with different dependency chains/configurations, etc). We had to modify the original solution to get here rather than extend it. Let's modify it again!

    CREATE TABLE packages
    (
        payload bytea NOT NULL,
        package_name character varying NOT NULL,
        version integer NOT NULL,
        vendor character varying NOT NULL,
        CONSTRAINT pk_package PRIMARY KEY (package_name, version, vendor)
    );

    ...
Great, now given a combo of package_name, version and vendor, we can uniquely identify a dependency without worry. All problems solved?

What now if Vendor has a customer with different needs, and must distribute two different derivations of the same package version and number? Do we add another field for "configuration", and if so, what type do we make it? Do we just rename the package and lose the relationship that exists between them? It should be blindingly obvious by now that we're just trying to add structure where it isn't really present, and we're making the solution to the problem more and more complicated.

Now take into account the possibility that Package Manager A implements dependencies using a tuple of (package_name, version, configuration), and Package Manager B implements dependencies using a tuple of (package_name, version, vendor), then if we want to unify these models under a "one true package manager", then our OTPM needs to model things using ("package_name, version, optional[vendor], optional[configuration]), and so forth. Multiply by N package managers with their own individual quirks and you get a "unified" model which is barely unified at all, the only structure to it is really our initial solution - packages with names.

Here's a reduction in complexity: Instead of using a name, which may be ambiguous and therfore requires us to constantly add fields and change the underlying model - let's propose we have some means of creating identifiers with some means of guaranteeing uniqueness. We can basically go back to our initial model:

    CREATE TABLE packages
    (
        payload bytea NOT NULL,
        identity uuid NOT NULL,
        CONSTRAINT pk_packages PRIMARY KEY (unique_id)
    );

    CREATE TABLE package_dependency
    (
        dependant_id uuid NOT NULL,
        dependency_id uuid NOT NULL,

        CONSTRAINT package_dependency_dependant_id_dependency_id_key UNIQUE (dependant_id, dependency_id)
 
        CONSTRAINT package_dependency_dependant_id_fkey FOREIGN KEY (dependant_id)
            REFERENCES packages (identity),
        CONSTRAINT package_dependency_dependency_id_fkey FOREIGN KEY (dependency_id)
            REFERENCES packages (identity),
    );
Now, if we want to integrate "Package Manager B" into this new model, we can extend our system. (Note keyword extend, not modify). We can implement a new table which references the base model.

    CREATE TABLE pmBpackages
    (
        identity uuid NOT NULL,
        package_name character varying NOT NULL,
        version integer NOT_NULL,
        vendor character varying NOT NULL,

        CONSTRAINT pmBpackages_identity_fkey FOREIGN KEY (identity)
            REFERENCES packages (identity)
    );
And as far as pmB is concerned, this is just an implementation detail - we can hide it from any users and just present the legacy view to them.

    CREATE OR REPLACE VIEW "pm_B_view" AS 
        SELECT package_name, version, vendor, payload
      FROM "pm_B_packages" NATURAL JOIN packages;
So here's a challenge. Begin with the schema for "Package manager A" as implied above, and try to implement "Package manager B" by extension (not modification). The first point of struggle might be to notice that you need to invent "configuration" values, since "Package Manager A" requires them as part of the key, and they're NOT NULL.

Hopefully it becomes obvious now why trying to build another model on top of other overcomplicated models is the real fools errand, because none of them so far have understood the essence of the problem.

I've glossed over how we might guarantee uniqueness for package identities so far. The solution is to use a cryptographic has of the payload, under the (fair) assumption that a modern hashing algorithm is sufficiently collision resistant. There's nothing language/framework/operating system specific about SHA-1 or whatever the choice of algorithm.

Re: Introducing PackageManagement in Windows 10

#129

Earlier quoted context omitted.

Or rather, slipstream future updates to current downloads. E.g., if you're installing component X that has patches A, B, C, then perhaps you should get customers to download component X that is already in a patched state.

What I always wonder, while twiddling my thumbs during the interminable upgrade-reboot-upgrade cycle, is how many of these these updates will be overwritten by a later update. Am I wasting my time downloading multiple versions of the same file?

Unfortunately the update reboot cycle is incredibly reliable, which is why it has persisted. Can't beat "millions of machines have taken these steps".

Thoroughly agree that a more simplified method would be awesome though.

Re: Introducing PackageManagement in Windows 10

#130

I was going to say, "Finally! They've gotten it right after all these years of sucking so hard as to be unusable on servers." But, I did some digging into the github for OneGet ( https://github.com/OneGet/oneget )... And, they haven't gotten it right. Windows package management still sucks so hard as to make the OS unusable on servers (and annoying as hell on the desktop). This is seemingly a simple-minded downloader…

Is application dependency management in windows normally a problem? Apart from the odd runtime, I expect Windows applications to be pretty much self contained, and not dependent on any system-wide libraries (which is a huge benefit I think). For development it's a different story, there you can have several levels of dependencies, but there NuGet at least appears at least as powerful as similar options on other platf…

"but there NuGet at least appears at least as powerful as similar options on other platforms"

That seems unlikely (i.e. can we upgrade the whole OS with NuGet?), but it does look like it is, at least, aware of some of the problems an actual package manager solves.

Post reply on HN