Package Details: xq 1.4.0-1

Git Clone URL: https://aur.archlinux.org/xq.git (read-only, click to copy)
Package Base: xq
Description: Command-line XML and HTML beautifier and content extractor
Upstream URL: https://github.com/sibprogrammer/xq
Licenses: MIT
Conflicts: yq
Submitter: syui
Maintainer: yigits
Last Packager: yigits
Votes: 4
Popularity: 0.014897
First Submitted: 2018-06-10 05:02 (UTC)
Last Updated: 2026-03-06 20:07 (UTC)

Dependencies (1)

Required by (1)

Sources (1)

Latest Comments

1 2 Next › Last »

dreieck commented on 2026-03-04 21:11 (UTC)

Ahoj,

thanks for the package.

Can you please move the go-specific downloads out of the build() function into prepare(), so that build() can run in an offline environment?

build() for compilation, package() to copy resulting files into place.

==> Starting build()...
go: downloading github.com/antchfx/xmlquery v1.4.3
go: downloading github.com/spf13/cobra v1.8.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/PuerkitoBio/goquery v1.10.0
go: downloading github.com/antchfx/xpath v1.3.3
go: downloading github.com/fatih/color v1.18.0
go: downloading golang.org/x/net v0.33.0
go: downloading golang.org/x/text v0.21.0
go: downloading github.com/andybalholm/cascadia v1.3.2
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading golang.org/x/sys v0.28.0

dafeder commented on 2024-08-20 17:02 (UTC)

Now getting

flag provided but not defined: -Wl,--sort-common
usage: link [options] main.o
...
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: xq-exit status 4

jmcantrell commented on 2024-03-17 18:10 (UTC)

When trying to rebuild a package that was successfully built previously, I'm getting the following error:

==> Starting prepare()...
mkdir: cannot create directory ‘build’: File exists
==> ERROR: A failure occurred in prepare().
    Aborting...

Perhaps a -p is needed for mkdir here?: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=xq#n32

Adding this locally seems to be okay. The package rebuilds anyway.

danlamanna commented on 2022-11-16 01:33 (UTC)

Confusingly, this package conflicts with https://archlinux.org/packages/community/any/yq/. The yq package also installs a /usr/bin/xq.

eclairevoyant commented on 2022-11-15 08:19 (UTC) (edited on 2022-11-15 08:20 (UTC) by eclairevoyant)

Wouldn't cleaning up the cache every once in a while solve that issue (find $SRCDEST -name '*.gz' -exec rm '{}' \;)?

I believe there's many good reasons to not use git for packages that aren't -git packages:

  • Using a git repo increases download size. Git repos are always increasing in size and are much larger than the code itself - as an example here, the gzip file is 164 KB compared to the repo itself taking up 668 KB

  • Using git adds an extra build dep that has to be installed (especially when building in a clean chroot as is always recommended)

  • If we want to check the PKGBUILD for correctness, that requires an extra step of going to check GitHub or opening up the git repo in $SRCDEST manually and ensuring the commits and tags match

  • Git uses SHA-1 for commit hashes which are notably more likely to have collisions than the hashes used in this PKGBUILD

  • This package is so small that git itself is several orders of magnitude larger than the entire repo

And in the case of this package, I don't think a few hundred kilobytes is really going to fill up your disk space if you have git (38+ MiB) installed.

grawlinson commented on 2022-11-15 02:56 (UTC)

Less disk cache used, I'd rather have one git repo than multiple tarballs that quickly eat my disk space.

eclairevoyant commented on 2022-11-13 08:26 (UTC) (edited on 2022-11-13 08:28 (UTC) by eclairevoyant)

@pmarreck FYI not sure where you got the idea that aurweb or its packages use svn, but that hasn't been true for about 7 years. everything's git-based.

also @grawlinson why use git instead of fetching the archive (https://github.com/sibprogrammer/xq/archive/refs/tags/v1.0.0.tar.gz) directly?

noraj commented on 2022-09-07 17:30 (UTC)

also I will conflict with https://github.com/sibprogrammer/xq if someone add it, for example it's packaged in debian

pmarreck commented on 2022-02-16 21:54 (UTC) (edited on 2022-02-16 22:07 (UTC) by pmarreck)

If you add the following lines ahead of the "go build" command in the PKGBUILD after cd'ing to the package dir, it should at least complete, but I agree with @andykluger, just update it to build from source

go mod download github.com/PuerkitoBio/goquery
go get github.com/syui/xq

It should at least install with that, but yeah, build from source pls. This utility would have just been really helpful to parse RSS feeds using jq syntax...

I can't stand Go, otherwise I'd volunteer to maintain this; if there was such a thing as a pull request and a test suite, I could have just contributed by fixing the issue and creating a PR, but Arch doesn't use Git, it uses SVN (as I'm just now discovering), sigh