OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003904 [pkg_get] regular use minor always 2009-09-17 16:39 2009-10-30 17:45
Reporter skayser View Status public  
Assigned To bonivart
Priority normal Resolution fixed  
Status closed  
Summary 0003904: pkgutil 1.7: --transform doesn't work when package is already installed
Description Me again. In contrary to the -s/--stream option, --transform seems to check the requested package against the ones that are already installed and doesn't proceed if the package is already installed.

skayser @ ray42 ~$ pkgutil --transform wget
You're not root and didn't set -W, using current dir.
Parsing catalog, may take a while...
Current packages: CSWcacertificates-20090108,REV=2009.01.08 CSWcommon-1.4.6,REV=2008.04.28 CSWcswclassutils-1.18,REV=2009.08.10 CSWosslrt-0.9.8,REV=2009.03.27_rev=k CSWwget-1.11.4,REV=2009.04.15
$

The primary usage of --transform for me is to cross-check ongoing packaging work with other packages. Whether a requested package is already installed doesn't really matter to me, i just want to have a look at the full package structure.

IIRC i was in favor of --transform to work as a switch to -d and to have -d download a package independently of whether it is already installed. Similar to "aptitude download <pkgname>" on Debian. Did we talk about that?
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0006743)
bonivart (developer)
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 (administrator)
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 (developer)
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 (developer)
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 (developer)
2009-10-09 20:57

r125 should be close to a complete fix for this.
(0006877)
bonivart (developer)
2009-10-19 20:30

There's a 1.8 beta 1 including this fix in testing.
(0006916)
bonivart (developer)
2009-10-30 17:45

1.8 released to current.


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker