FS#78484 - [blueprint-compiler] python-argparse breaks batch-compile

Attached to Project: Community Packages
Opened by Andrey (aag) - Thursday, 11 May 2023, 12:19 GMT
Last edited by Toolybird (Toolybird) - Saturday, 16 September 2023, 01:22 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
python-argparse breaks batch-compile in blueprint-compiler resulting in usage printed instead of compilation.
Example with bottles package:

```
[52/55] Generating bottles/frontend/ui/blueprints with a custom command
usage: blueprint-compiler [-h] [--version] command ...

positional arguments:
command
compile Compile blueprint files
batch-compile
Compile many blueprint files at once
port Interactive porting tool
lsp Run the language server (for internal use by IDEs)
help Show this message

optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
[53/55] Generating bottles/frontend/ui/bottles_gresource with a custom command
FAILED: bottles/frontend/ui/bottles.gresource
/usr/bin/glib-compile-resources ../bottles/frontend/ui/bottles.gresource.xml --sourcedir bottles/frontend/ui --sourcedir ../bottles/frontend/ui --internal --generate --target bottles/frontend/ui/bottles.gresource --dependency-file bottles/frontend/ui/bottles.gresource.d
../bottles/frontend/ui/bottles.gresource.xml: Failed to locate “window.ui” in any source directory.
[55/55] Generating data/com.usebottles.bottles.metainfo.xml with a custom command
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
Aborting...
-> error making: bottles-exit status 4
-> Failed to install the following packages. Manual intervention is required:
bottles - exit status 4
```

https://bugs.archlinux.org/task/78122 is probably related.

Steps to reproduce:
- Install python-argparse
- Try to build any package that uses blueprint-compilers batch-compile
This task depends upon

Closed by  Toolybird (Toolybird)
Saturday, 16 September 2023, 01:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  python-argparse now dropped from the repos
Comment by Toolybird (Toolybird) - Friday, 12 May 2023, 01:28 GMT
Yes, can repro. But unfortunately blueprint-compiler is an orphaned pkg in Arch i.e. there is no official maintainer. Please see  FS#76538  for the background on why it entered the distro in the first place.

The problem appears to be an upstream issue. Have you reported upstream?
Comment by Antonio Rojas (arojas) - Friday, 12 May 2023, 06:28 GMT
This isn't really a bug. The argparse module is included in python since 3.2 so python-argparse has been abandoned for a long time and shouldn't really be installed at all. Some of our packages still seem to depend on it, but I'm sure that is a mistake.
Comment by Andrey (aag) - Friday, 12 May 2023, 11:08 GMT
This is definitely not an upstream issue and imo it _is_ a packaging bug, blueprint-compiler should conflict with python-argparse package, or at least there should be a notice about such conflict.
A lot of GTK apps are affected:

https://aur.archlinux.org/packages/gdm-settings#comment-910489
https://aur.archlinux.org/packages/converter#comment-911538
https://aur.archlinux.org/packages/dialect#comment-911536
https://aur.archlinux.org/packages/wayfarer-git#comment-912033
Comment by Oid Maps (dreieck) - Friday, 12 May 2023, 11:33 GMT
> The argparse module is included in python since 3.2 so python-argparse has been abandoned for a long time and shouldn't really be installed at all. Some of our packages still seem to depend on it, but I'm sure that is a mistake.

Then I think `python-argparse` should be converted to a simple empty metapackage which provides the needed dependency.
Comment by Antonio Rojas (arojas) - Friday, 12 May 2023, 11:37 GMT
> Then I think `python-argparse` should be converted to a simple empty metapackage which provides the needed dependency.

No, the dependency should be removed from those packages if possible and the python-argparse package dropped from the repos
Comment by Oid Maps (dreieck) - Friday, 12 May 2023, 12:01 GMT
> > Then I think `python-argparse` should be converted to a simple empty metapackage which provides the needed dependency.
>
> No, the dependency should be removed from those packages if possible and the python-argparse package dropped from the repos

Sure. The other would be a workaround until the affected packages have kept up.

A workaround for the time until packages have kept up is now in the AUR:
"python-argparse-shim" (https://aur.archlinux.org/packages/python-argparse-shim).

Issue has been reported to community packages and AUR packages that depend on "python-argparse".

Loading...