Opened 18 years ago
Closed 16 years ago
#11891 closed defect (fixed)
BUG: variants ignored in deps action
Reported by: | gwhitney@… | Owned by: | gwhitney |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.8.0 |
Component: | base | Version: | |
Keywords: | deps variant | Cc: | kballard (Lily Ballard), ryandesign (Ryan Carsten Schmidt), mjs@…, ehainry@…, jmroot (Joshua Root), blb@…, raimue (Rainer Müller), vinc17@… |
Port: |
Description
I installed MacPorts from 1.4.0 tarball, and successfully executed
sudo port selfupdate
to upgrade to 1.4.3. Now, executing
port deps emacs-devel +x11
(for example) yields output
emacs-devel has library dependencies on: ncurses
But this is clearly wrong: emacs-devel +x11 also depends on jpeg, tiff, libpng, perhaps among other things.
Attachments (2)
Change History (21)
Changed 18 years ago by gwhitney@…
Attachment: | deps.patch added |
---|
comment:1 Changed 18 years ago by gwhitney@…
The changes in r25033 and r25255 now make it easy to fix this bug: all that has to happen is for action_deps to share the code eridius put in action_info which does dportopen to get the "real" portinfo. That's the gist of this patch. There are two other points worth noting:
- A couple places in this patch it's handling an attribute called "portvariants". This goes hand-in-hand with my patch for the registry bug (see ticket #11920) where the active variants are recorded in portvariants right at dportopen time; but these changes are innocuous if that patch has not been applied. If it has, they show, for example, in port deps, what variants are active, since the answer depends on that information.
- In the same vein, since other information in port info depends on the active variants, there's a small patch to portutil.tcl which appends the active variants to the long_description, together with their descriptions if any. I think this clarifies the other output of port info, and is a nice proposed compromise between showing all variant descriptions and showing none: just show the active ones. That way, if you explicitly request port info foo +bar, you will see the description of variant bar, which I think makes sense. However, this chunk of the patch, the only chunk in portutil.tcl, is completely independent of the rest of the patch and can be eliminated if the developers disagree with this idea of modifying the long_description.
Thanks!
comment:2 Changed 18 years ago by jberry@…
Glen,
Nice work. Let's get you a commiter account so you can work to get this stuff working in trunk.
One comment: it would seem useful to make action_variants also use the current port, rather than the index, in parallel with info and deps. The fact that info and variants now return information from different sources is probably wrong.
comment:3 Changed 18 years ago by gwhitney@…
I did think about action_variants, and my conclusion was that it's illegitimate for one variant to add or delete other variants, that's what you use requires and conflicts for between variants, which must all be defined at the top level. So therefore the variants list in the index must be correct. If anyone has a different argument to the contrary, I'd be happy to put the dportopen stuff in action_variants as well.
comment:4 Changed 17 years ago by gwhitney
Cc: | gwhitney@… added; gwhitneycom1@… removed |
---|---|
Milestone: | → MacPorts 1.5 |
Owner: | changed from macports-dev@… to gwhitney@… |
Status: | new → assigned |
OK, since my documentation patch was checked in by another maintainer (thanks!) I'm switching to using this patch as my first effort to properly check in a change to base. But I've split off point 2 in the 5/17/07 comment as a separate RFE ticket #12081, since it's logically distinct from this bugfix. I will only apply the portions of the patch relating to making port deps read the portfile with variants to get its dependency information.
comment:5 Changed 17 years ago by kballard (Lily Ballard)
Cc: | gwhitney@… added; gwhitney@… removed |
---|
I haven't had time to properly evaluate your patch, but the description sounds good. From your last comment it sounds like maybe you're working towards getting committer status, and thus want to commit this yourself? If that's not the case, let me know and I'd be happy to test and commit it.
Oh, and I would recommend pulling action_variants from the portfile if you're pulling the other info. Yeah, the index should match the portfile, but what if I update my portfile add a new variant? The index will be out of date until the next portindex run.
comment:6 Changed 17 years ago by gwhitney
Yes, I do now have committer status, and I was planning on using this as my first try at a commit, since it's pretty small, self-contained, easy to test, etc. It's going a bit slow since I'm getting used to Subversion (which actually I want to use through SVK, since being able to make local branches is a real help if I'm working on more than one ticket at once), and because I want to really be careful with testing and understand that thoroughly as well (since there doesn't seem to be any fully standardized, documented, comprehensive pre-check-in testing protocol out there).
So if this isn't urgent and folks (like you, eridius) are willing to wait a bit I would appreciate the opportunity to check this one in myself. Further, I will include the portfile-reading stuff in action_variants as well, as per your convincing argument of why that's a better idea than relying on the index. Regards, Glen
comment:7 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | gwhitney@… eridius@… ryandesign@… added; gwhitney@… removed |
---|
comment:8 Changed 17 years ago by nox@…
Priority: | Expected → Normal |
---|---|
Summary: | BUG: base-1.4.3 variants ignored in deps action → BUG: variants ignored in deps action |
Version: | 1.4.3 |
comment:9 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Milestone: | MacPorts 1.5 → MacPorts base bugs |
---|
comment:10 Changed 17 years ago by jmroot (Joshua Root)
Cc: | mjs@… added; gwhitney@… removed |
---|
Cc reporter of duplicate #12258.
comment:11 Changed 17 years ago by jmroot (Joshua Root)
Cc: | ehainry@… added |
---|
Cc reporter of duplicate #12275.
comment:12 Changed 17 years ago by jmroot (Joshua Root)
Cc: | jmr@… added |
---|
Are you still planning on committing this, Glen?
comment:13 Changed 16 years ago by blb@…
Cc: | blb@… added |
---|
Attaching a new diff for base/src/port/port.tcl to enable handling variants for 'port deps'; this one just copies what is currently done for 'port info' so not much to it really.
Changed 16 years ago by blb@…
Attachment: | base_src_port_port.tcl.diff added |
---|
diff to base/src/port/port.tcl (on trunk)
comment:15 Changed 16 years ago by jmroot (Joshua Root)
Committed blb's patch in r40729. Are there still significant problems that would have been fixed by the older patch but not the newer one? I see a lot of stuff in there about global variations, for example.
comment:16 follow-up: 19 Changed 16 years ago by jmroot (Joshua Root)
Even though #11897 is fixed, global variants (from variants.conf) still don't modify the dependencies displayed by port deps
or port info
. So some parts of the original patch are probably still needed.
comment:17 Changed 16 years ago by blb@…
Milestone: | MacPorts base bugs → MacPorts 1.8.0 |
---|
comment:19 Changed 16 years ago by gwhitney
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Replying to jmr@…:
Even though #11897 is fixed, global variants (from variants.conf) still don't modify the dependencies displayed by
port deps
orport info
. So some parts of the original patch are probably still needed.
Resolved these outstanding issues in r44340, and marking the ticket as closed. Note that to avoid duplication of code in this fix, I reimplemented "port deps" as an alias for "port info" with the proper flags to show only dependency information. This has naturally changed the exact text format produced by "port deps". If the format change is problematic (e.g. if anyone was parsing the output of port deps), please let me know (e.g. by opening a ticket and assigning it to me) -- it would be possible at the cost of slight recomplication of the code to restore the old output format of "port deps".
Proposed patch against r25303 to resolve this issue