#1931 Hack around c8s python39 module versions not in ascending order
Merged a month ago by zlopez. Opened 2 months ago by churchyard.
fedora-infra/ churchyard/ansible c8s-hack  into  main

@@ -48,7 +48,7 @@ 

  	echo "splitter ${ARCH} baseos failed"

  	exit

      fi

-     ${BINDIR}/splitter.py --action hardlink --target CS-8-002 ${HOMEDIR}/AppStream/${ARCH}/os/ --only-defaults &> /dev/null

+     ${BINDIR}/splitter.py --action hardlink --target CS-8-002 ${HOMEDIR}/AppStream/${ARCH}/os/ --only-defaults --hack-python39 &> /dev/null

      if [ $? -ne 0 ]; then

  	echo "splitter ${ARCH} appstream failed"

  	exit

@@ -192,7 +192,7 @@ 

      return isok

  

  

- def get_default_modules(directory):

+ def get_default_modules(directory, *, hack_python39=False):

      """

      Work through the list of modules and come up with a default set of

      modules which would be the minimum to output.
@@ -275,14 +275,15 @@ 

                          if tmp_name in tempdict:

                              # print("We found %s" % tmp_name)

                              # Get the stream version we are looking at

-                             ts1=ourname.split(":")[2]

+                             n1,_,ts1,*_=ourname.split(":")

                              # Get the stream version we stored away

                              ts2=tempdict[tmp_name].split(":")[2]

                              # See if we got a newer one. We probably

                              # don't as it is a sorted list but we

                              # could have multiple contexts which would

                              # change things.

-                             if ( int(ts1) > int(ts2) ):

+                             if ( int(ts1) > int(ts2) or

+                                  (hack_python39 and n1 == "python39" and len(str(ts1)) < len(str(ts2))) ):

                                  # print ("%s > %s newer for %s", ts1,ts2,ourname)

                                  tempdict[tmp_name] = ourname

                          else:
@@ -344,6 +345,8 @@ 

                          action='store_true', default=False)

      parser.add_argument('--only-defaults', help='Only output default modules',

                          action='store_true', default=False)

+     parser.add_argument('--hack-python39', help='Hack around https://pagure.io/releng/issue/11947',

+                         action='store_true', default=False)

      return parser.parse_args()

  

  
@@ -407,7 +410,8 @@ 

      repos = parse_repository(args.repository)

  

      if args.only_defaults:

-         def_modules = get_default_modules(args.repository)

+         def_modules = get_default_modules(args.repository,

+                                           hack_python39=args.hack_python39)

      else:

          def_modules = set()

  

Fixes https://pagure.io/releng/issue/11947

See also:

https://issues.redhat.com/browse/CS-2025 (module with highest version is incomplete)
https://issues.redhat.com/browse/CS-2044 (module versions are not in ascending order)

I assume you want this sooner rather than later? Will need a freeze break since we are in freeze.

I can +1 it...

Yes please, the python3.11-rpm package is not installable on c8s and I have no way of fixing it before this thing is resolved.

Thanks

@kevin Could you please get this merged/deployed?

rebased onto fc46013

a month ago

rebased onto fc46013

a month ago

Pull-Request has been merged by zlopez

a month ago

Metadata Update from @zlopez:
- Pull-request tagged with: freeze-break-request

a month ago

As it got enough +1 I merged it and deployed it.

Do you know how often this runs? So far the Koji repo still contains packages from the broken module.

@churchyard 10 10 * * * root /usr/local/bin/cents8-split.sh

Thanks. It seems this was deployed at 10:09:55 UTC, so no idea if it run. Will wait 24 hours then.