tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] Broken logic in lang/python27 regarding NIS



"Dr. Thomas Orgis" <thomas.orgis%uni-hamburg.de@localhost> writes:

> Hi,
>
> I had to fix python27 to build on my NIS-less Linux box. I think the
> logic of a conditional was not implemented as intended:
>
> diff -x CVS -ruN pkgsrc-cvs-20190321/lang/python27/Makefile pkgsrc/lang/python27/Makefile
> --- pkgsrc-cvs-20190321/lang/python27/Makefile  2019-03-20 12:54:05.000000000 +0100
> +++ pkgsrc/lang/python27/Makefile       2019-03-24 15:30:32.182866104 +0100
> @@ -113,7 +113,7 @@
>  PLIST.dll=     yes
>  .  if ${OPSYS} == "MirBSD" || "${OS_VARIANT}" == "chromeos"
>  # neither nis nor no-nis
> -.  elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
> +.  elif ${OPSYS} != "NetBSD" && exists(/usr/bin/ypcat)
>  PLIST.nis=     yes
>  .  else
>  PLIST.no-nis=  yes
>
> Is my diagnosis correct? If yes, I'd be happy if someone could
> integrate the fix to CVS.

That's not right, because it will break the build on NetBSD, where ypcat
exists and there is NIS support.  On NetBSD 8 amd64, python27 ends up
with PLIST.nis=yes (because ypcat exists), and thus in the package there
is:

  /usr/pkg/lib/python2.7/lib-dynload/nis.so

Can you explain more precisely about your Linux system?  Do you mean
there is no file /usr/bin/ypcat, and no support for NIS/YP?

Is there some notion within Linux of some systems supporting NIS and
some not, depending on optional packages?



I don't understand the conditional either.  It seems that if
/usr/bin/ypcat exists, then nis support should be assumed, regardless of
OS.  (Presumably the build looks for library functions and builds
different libraries and the package Makefile conditional is just trying
to match what will happen.)

So, I would tempted to make this change instead:

  -.  elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
  +.  elif exists(/usr/bin/ypcat)

but I wonder why it is written the way it is.


Home | Main Index | Thread Index | Old Index