Notes |
|
(0006743)
|
bonivart
|
2009-09-23 18:12
|
|
I agree with that --transform should disregard whether or not a package is installed. I will have to fix this.
But for -d I'm not really sure since it would change the current/old behavior (--transform is new) and someone might file a bug about that too. :-/ |
|
|
(0006746)
|
skayser
|
2009-09-23 19:36
(edited on: 2009-09-23 19:38) |
|
Overall, --transform shouldn't behave that much different from -d (just an additional transform after the package has been downloaded - more a variant of the -d mode than a mode on its own). So IMHO we should see whether we can do something about both of them.
Now that -d had skipped locally installed pkgs in the past, i see two options
1) Add a switch to ignore the installation state of a pkg, so that one can force the download of all requested pkgs
pkgutil -d [--transform] --all foobar
pkgutil -d [--transform] --force foobar
pkgutil -d [--transform] --?? foobar
Both are not very intuitive (i can't come up with an intuitive one right now), but should demonstrate what i mean.
2) Break with existing behavior, ignore the installation state of a pkg, and introduce an additional switch (could either be for the -d or the -i mode, see below) which would restore previous behavior. Needs to be noted in the changelog of course.
I am in favor of option number 2 for two reason. First, it is consistent with the -s behavior which just downloads all pkgs. Second, if i want to download pkgs, i want to download them. It is not as if i was saying "pkgutil, please do as if you were installing, but only download". If i wanted that, i would rather say something like: "pkgutil -i --download-only".
To draw a comparison with the Debian's aptitude: to download a pkg on Debian i have two options
aptitude install -d foobar
aptitude download foobar
The first one is the installation mode and would download foobar only if it wasn't installed yet. Feels intuitive, no? One knows that aptitude is in installation mode, does all the usual, clever logic, but then simply downloads instead of installing. The second one is the download mode which simply downloads foobar without honoring any local pkg states. Also feels intuitive to me (although i somehow like our download behavior of downloading deps also ;).
In pkgutil we could thus have
pkgutil -i --download foobar (or pkgutil -d --skip-installed)
pkgutil -u --download foobar
^^ Do as if you were installing/upgrading, but stop after the download.
pkgutil -d foobar
^^ Simply download a package (plus its dependencies?).
Plus variants of the -d mode.
pkgutil -d --transform foobar
pkgutil -d --stream foobar
What do you think? Any possible comparisons to how things work with yum on RHEL?
|
|
|
(0006823)
|
bonivart
|
2009-10-09 18:36
|
|
I like your (2nd) suggestion a lot. It makes sense that you don't care about installed packages when not installing/upgrading. I'm changing the behavior for --download and --transform.
r123 now contains part of your suggestion:
http://pkgutil.svn.sourceforge.net/viewvc/pkgutil/trunk/pkgutil?revision=123 [^]
Download and transform now fetches all needed packages regardless of what's installed. You can add --nodeps or --exclude if you want less. |
|
|
(0006824)
|
bonivart
|
2009-10-09 18:42
|
|
Note that I haven't implemented --transform and --stream as suboptions to --download. I think that's nicer and that they belong together but I haven't gotten that far yet. :-) |
|
|
(0006825)
|
bonivart
|
2009-10-09 20:57
|
|
r125 should be close to a complete fix for this. |
|
|
(0006877)
|
bonivart
|
2009-10-19 20:30
|
|
There's a 1.8 beta 1 including this fix in testing. |
|
|
(0006916)
|
bonivart
|
2009-10-30 17:45
|
|
|