pkgsrc-Users archive

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

Re: mail/offlineimap rfc6555 module dependency missing



On 08/02, Greg Troxel wrote:
> "J. Lewis Muir" <jlmuir%imca-cat.org@localhost> writes:
> > On 08/02, Greg Troxel wrote:
> >> "J. Lewis Muir" <jlmuir%imca-cat.org@localhost> writes:
> > Well, I went to add it to wip/py-rfc6555, but it turns out it was
> > already there.  Unfortunately, the date of the last commit on it is Mon
> > Feb 14 10:36:00 2022 +0100.  Since I don't want to change someone else's
> > wip work, I made changes to it locally, and I've included a diff of my
> > changes to it below.
> 
> Write to the maintainer.  If they don't answer, change it.  If they do,
> talk to to thema bout it.  It's great to be polite, but it's not
> sensible to just defer without engaging.

Well, the difficulty was that the package in wip was over two years old,
I suspected that the maintainer probably had forgotten about it even
being there, and I wanted to just fix the problem and not invest any
more time in it than I already had.  I was wishing for something like
submitting a patch series via email or something like a pull request,
where I can just create it and not have to worry about someone else's
patch series; they can of course do whatever they want, but I don't have
to coordinate with them in order to create my patch series.

Anyway, I emailed the maintainer, but there was no reply in five
business days, so I've now committed my changes to wip/py-rfc6555.

> > Then I found that py-rfc6555 needed the Python selectors2 module, so I
> > added that at wip/py-selectors2.

It turns out py-selectors2 was already in pkgsrc at devel/py-selectors2,
but I didn't think it existed because the build failed for it, and one
of the error messages was

  => Full dependency py27-selectors2>=2.0.1: NOT found

In my haste, I incorrectly concluded that the package didn't exist,
which is why I created it at wip/py-selectors2.  But the real problem
was that there was no Python version that could satisfy the constraints
of both mail/offlineimap and devel/py-selectors2, which I would have
understood had I paid attention to the error messages that followed:

  => Verifying reinstall for ../../devel/py-selectors2
  ERROR: This package has set PKG_FAIL_REASON:
  ERROR: No valid Python version

adam@ removed my wip/py-selectors2 in commit

  https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commit;h=33fe8aa05926f1a7cff57479f9aef2fd7de76757

but the problem with

  devel/py-selectors2/Makefile

is that it has

  PYTHON_VERSIONS_INCOMPATIBLE=	27

which is no good for

  mail/offlineimap/Makefile

which has

  PYTHON_VERSIONS_ACCEPTED=	27

It appears that in commit

  https://github.com/NetBSD/pkgsrc/commit/57bceddce29c37ef8b382b32410cc6eafe17c26a

wiz@ marked devel/py-selectors2 as not supporting Python 2 because "a
dependency does not support Python 2 any longer."  I tried marking it as
supporting Python 2, and it worked for me (i.e., OfflineIMAP was able to
successfully run and sync my mailboxes).  Here's the diff:

====
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/py-selectors2/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	1 May 2022 09:13:41 -0000	1.4
+++ Makefile	13 Aug 2024 22:35:58 -0000
@@ -16,7 +16,7 @@

 USE_LANGUAGES=	# none

-PYTHON_VERSIONS_INCOMPATIBLE=	27
+PYTHON_27_ACCEPTED=	yes

 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
====

But, I obviously don't want to undo something that wiz@ did, so what's
a good way to handle this?  I suppose a new package that is like
devel/py-selectors2 could be made that's specifically for Python 2.  But
I'm wondering if the above patch might be simpler, and it would avoid
the need for a Python-2-only devel/py-selectors2 package.  Is the only
benefit to marking devel/py-selectors2 as not supporting Python 2 that
it avoids trying to build a package that either will never succeed
with Python 2, or will never run correctly with Python 2?  If so, in
my light testing on macOS Sonoma, that seems not to be the case for
devel/py-selectors2 since it does build for Python 2, and it seems to
work for how OfflineIMAP uses it.

> > And then I needed to add the dependency on wip/py-rfc6555 to
> > mail/offlineimap.  The diff for that is below also.
> 
> That would be "wip/offlineimap" as an upgrade candidate :-)

OK, I've done that now at wip/offlineimap.

BTW, are all pkgsrc fixes supposed to be staged in wip regardless of how
small?  For example, in wip/offlineimap, it's a 2-line fix.

Thanks,

Lewis


Home | Main Index | Thread Index | Old Index