Opened 18 years ago

Closed 18 years ago

#6207 closed defect (fixed)

BUG: teTeX +nox11 still wants to build xfree86 on port upgrade

Reported by: lars@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.0
Keywords: Cc: olegb@…, gwright@…
Port:

Description

I have been enjoying the very nice teTeX pacakge in dports, but recently have been running into a problem. Even though I built and installed the +nox11 variant of teTeX, dports still seems to regard xfree86 as a dependency of the installed package and wants to build and install xfree any time I do "port -a upgrade", "port upgrade teTeX" or "port upgrade teTeX +nox11". This seems like a bug with the portfile?

~% port installed tetex The following ports are currently installed:

tetex @3.0_1+nox11 (active)

~% sudo port -av upgrade Password: ---> Extracting XFree86 ---> Extracting XFree86-4.5.0-src-1.tgz C

~% sudo port -v upgrade teTeX +nox11

(same as above)

Attachments (2)

inst.log (2.6 KB) - added by gwright@… 18 years ago.
Installation log
upgr.log (5.9 KB) - added by gwright@… 18 years ago.
Upgrade log

Download all attachments as: .zip

Change History (13)

comment:1 Changed 18 years ago by gwright@…

Owner: changed from darwinports-bugs@… to gwright@…

It's not a bug in the portfile; when you specify nox11, the XFree86 port is deleted from the dependency list. A long time ago there was a bug in the DP infrastructure that caused port dependencies to be checked improperly. What version of darwinports are you running and have you run

sudo port selfupdate

recently, to update the infrastructure and the ports?

-Greg

comment:2 Changed 18 years ago by lars@…

This is with DP 1.2, installed on a clean OS X system using the tiger dmg available from www.darwinports.org/getdp. This is on 10.4.3 with xcode 2.2. Yes, the problem is still there after a selfupdate. Sorry, I should have mentioned those things in the inital bug report.

-Lars

comment:3 Changed 18 years ago by gwright@…

Status: newassigned

Lars,

Could you run

sudo port -dv install teTeX +nox11 > inst.log 2>&1

and

sudo port -dv upgrade teTeX +nox11 > upgr.log 2>&1

and send me the output of both? You can stop the build with C after a minute or so; the X11 check is done quite near the beginning.

I suspect a bug in the DP infrastructure causes it to ignore variant specifications when upgrading.

-Greg

comment:4 Changed 18 years ago by gwright@…

Lars,

The bug is not in the portfile, but in the way the DP infrastructure handles upgrades. (In short, it ignores variants when doing an upgrade.) It is clearly a bug and now that some other changes to the upgrade infrastructure are stabilizing, it should be possible to track it down and fix it. It might take some time, since it might not be a simple mistake, but a more complicated design error.

-Greg

comment:5 Changed 18 years ago by gwright@…

Component: dportsbase
Owner: changed from gwright@… to darwinports-bugs@…
Status: assignednew

Hi,

This is really a base bug, not a dports bug. The underlying problem is that variants are not respected while doing an upgrade. In the case reported, the +nox11 variant is no propagated to the new port, so it trys to build X11.

I have noticed similar behavior with platform variants. (They are not propagated either, which can cause the build to fail.)

I'm also reassigning this bug to darwinports-bugs, since it is not specific to a port I maintain. I'll take a look at the base code to see what I can do.

Greg

comment:6 Changed 18 years ago by jmpp@…

Cc: olegb@… added

Hey Greg! I am Cc'ing Ole here as the author of the upgrade code, in case he an spare some time and have a look at this issue.

Also a comment to you, would you consider renaming the "nox11" variant to "no_x11"? Is not such a cosmetic change, standarizing on variant naming reports a lot of benefits and the "no_*" format has been implicitly accepted as the standard for these type of variants.

Thanks and regards!

-jmpp

comment:7 Changed 18 years ago by gwright@…

Hi Juan,

Thanks for cc-ing to Ole.

I'll change the "no*" variants in my ports to "no_*". Any chance of getting a note that that is the preferred style in the doc?

Best Wishes, Greg

comment:8 Changed 18 years ago by olegb@…

upgrade *should* (as it is) honor variants,

It could be easier to debug if we had a debug'ed output use the -d switch.

comment:9 Changed 18 years ago by gwright@…

Hi Ole,

The original report may have sent me a comparison of upgrade versus install with the -dv flags set. If he did, I'll send it, if not, I'll make a test case that demonstrates the problem.

-Greg

Changed 18 years ago by gwright@…

Attachment: inst.log added

Installation log

Changed 18 years ago by gwright@…

Attachment: upgr.log added

Upgrade log

comment:10 Changed 18 years ago by gwright@…

Hi Ole,

I've attached logs of both an installation from scratch and an upgrade. For the original installation I used:

sudo port -dv destroot +no_x11 > dest.log 2>&1 sudo port install +no_x11

(This was in the dports/print/teTeX directory.) I then made a few formatting changes, bumped the revision number and ran:

sudo port -dv update teTeX > up.log 2>&1

The attached file inst.log is a truncated version of dest.log, upgr.log is a truncated version of up.log.

From my brief look at the upgrade log, the variant information is seen by the upgrade script, but it is checked _after_ the dependency test. So X11 will be built on systems that do not have it installed, even if the +no_x11 variant is selected.

Let me know if I can do anything else to resolve this problem.

Best Wishes, Greg

comment:11 Changed 18 years ago by pguyot (Paul Guyot)

Resolution: fixed
Status: newclosed

I believe this problem is fixed as I cannot reproduce it.

Note: See TracTickets for help on using tickets.