Giter Club home page Giter Club logo

xtools's Introduction

XTOOLS(1)                   General Commands Manual                  XTOOLS(1)

NAME
     xtools – A collection of small utilities for use with XBPS

COMMANDS
     xbarf
        – Display build logs of last build

     xbuildbarf [arch]
        – Spy on current buildbot output

     xbulk [-n] [-k] [xbps-src flags] pkgs ...
        – simple XBPS bulk builder
          -n  dry-run mode
          -k  keep going on errors

     xbump pkgname [git commit options]
        – git commit a new package or package update

     xchangelog template | pkgname
        – open package changelog

     xcheckmypkgs [email]
        – check your packages for updates

     xcheckrestart [-v]
        – list programs using outdated libraries
          -v  verbose mode, also print the library names

     xchroot directory [command ...]
        – chroot into a Void (or other Linux) installation

     xclash
        – detect file conflicts between XBPS packages

     xdbg pkgs ...
        – list debugging packages for pkgs and recursive dependencies

     xdiff [-u | -l] [basedir]
        – merge/diff/list XBPS .new-* files
          -l  list .new files
          -u  print unified diffs

     xdistdir
        – figure out XBPS_DISTDIR

     xdowngrade pkgfiles.xbps ...
        – install XBPS package directly from .xbps file

     xetcchanges
        – show diff of /etc against binary packages

     xgensum [-f] [-c] [-i] [-H hostdir] templates ...
        – update SHA256 sum in templates
          -f  force (re-)download of distfiles
          -c  use content checksum
          -i  replace checksum in-place
          -H  absolute path to hostdir

     xgrep pattern pkgs ...
        – search files limited to XBPS package contents

     xhog
        – list installed XBPS packages ordered by size

     xi pkgs ...
        – like ‘xbps-install -S’, but take cwd repo and sudo/su into account

     xilog [pattern]
        – list installed packages by install-date

     xlg pkg
        – open short commit log for XBPS template

     xlint template | pkgname | :pkgname | :
        – scan XBPS template for common mistakes
        - use ‘:pkgname’ to lint template as staged in the git index
        - use ‘:’ to lint all templates staged in the git index

     xlocate -g | -S | [-EFGPiw] pattern
        – locate files in all XBPS packages
          -g  Update a git based xlocate database, useful for local
              repositories
          -S  Sync with the official git based xlocate database, which is
              recommended before using the tool
          -E | -F | -G | -P | -i | -w
              Modifies how pattern is matched. See git-grep(1) for more info

     xlog pkg
        – open commit log for XBPS template

     xls pkg ...
        – list files contained in pkg (including binpkgs)

     xmandoc manpage
        – read manpage of possibly not installed package

     xmksv [-l] [newsvdir ...]
        – create new runit service templates. Also creates log service if -l
        is passed.

     xmypkgs [email]
        – list all pkgs maintained by you

     xnew [-a] pkg [subpkgs ...]
        – create XBPS template
          -a  append subpkgs to existing pkg

     xnews [pattern]
        – list news messages for packages by install-date

     xnodev
        – list not installed -devel packages for installed packages

     xoptdiff [-q] [pkgs ...]
        – show template options which differ from binary package
          -q  quiet mode, show package names only

     xpcdeps pcfile ...
        – finds package matching the Requires: section of pkg-config files

     xpkg [-amOHDvV] [-r rootdir] [-R repo]
        – convenient package lister
          -a  list all packages (default: only installed)
          -m  list manual packages
          -O  list orphaned packages
          -H  list packages on hold
          -D  list installed packages not in repo
          -L  list installed packages not from remote repos
          -v  show version numbers
          -V  show version numbers and description
          -r rootdir
              specifies a full path for the target root directory
          -R repo
              consider only packages from repo

     xpkgdiff [-Sfrxt] [-a arch] [-R url] [-c file] [-p prop,...] pkg
        – compare a package in the repositories to the locally-built version
        - run from within a void-packages checkout
        - set DIFF to change the diff program used
          -S  compare package metadata
          -f  compare package file lists
          -r  reverse diff (compare local to remote)
          -x  compare package dependencies
          -t  compare the full package dependency tree.  Only used with -x
              (equivalent to xbps-query --fulldeptree -x)
          -a arch
              set architecture for comparison
          -R url
              set remote repository url
          -c file
              compare a file from the package (equivalent to xbps-query --cat)
          -p prop,...
              compare properties of the package

     xpstree
        – display tree view of xbps-src processes

     xq [-R] pkg ...
        – query information about XBPS package
          -R  query remote repos

     xrecent [repourl | arch]
        – list packages in repo ordered by build date

     xrevbump message templates ... [-- git commit options]
        – increase template revision and commit. Use ‘-’ to read templates
        from stdin.

     xrevshlib package
        – list packages shlib-dependent on package or its subpackages

     xrs pattern
        – like xbps-query -Rs, but take cwd repo into account

     xsrc pkg
        – list source files for XBPS template

     xsubpkg [-m] pkg
        – list all subpackages of a package
          -m  only print main package

     xuname
        – display system info relevant for debugging Void

     xvoidstrap dir [packages]
        – bootstrap a new Void installation

DESCRIPTION
     Tools working on the void-packages tree use xdistdir to find it, check
     that its output is reasonable first.

     xi, xls, xq and xrs prefer the hostdir / binpkgs repo if you run them
     from a void-packages checkout.

LICENSE
     xtools is in the public domain.

     To the extent possible under law, the creator of this work has waived all
     copyright and related or neighboring rights to this work.

     http://creativecommons.org/publicdomain/zero/1.0/

BUGS
     All bugs should be reported to https://github.com/leahneukirchen/xtools

Void Linux                       June 25, 2019                      Void Linux

xtools's People

Contributors

ahesford avatar beefcurtains avatar cameronnemo avatar cattyhouse avatar chocimier avatar classabbyamp avatar duncaen avatar ebfe avatar ericonr avatar fosslinux avatar gottox avatar jnbr avatar johnnynator avatar leahneukirchen avatar maxice8 avatar paper42 avatar piraty avatar pullmoll avatar q66 avatar sgn avatar shtayerc avatar st3r4g avatar stefankreutz avatar styrsven avatar the-eater avatar tornaria avatar triallax avatar uggedal avatar vaelatern avatar yopito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xtools's Issues

xlint: check one linebreak on end of file

Hello, I thing the following rules would be great to include:

  1. check if last character of file is \n - without it using cat on the file is ugly.
  2. check if there is only one \n on end of file - no multiple newlines on end of file

Thanks.

consider skiprdeps

appears in the manual.

srcpkgs/android-studio/template:26: custom variables should use _ prefix: skiprdeps="/opt/android-studio/plugins/android/resources/perfa/armeabi-v7a/libperfa.so

used in android-studio

xgensum: Respect user defined locations

I use a custom hostdir and masterdir on xbps-src because I want to keep my builds between different branches/packages.

xgensum from xtools does not respect a custom location of these paths like xbps-src does.

Manpages (documentation in overall)

The only description of commands is in README file on this repo.

Can you add manpages for each (or combined manpage xtools with symlinks) tool, and -h/--help option? This will make our lifes easier, where we can get know about usage directly from program itself (or manpage) :>

xnew defaults to Vim

xnew defaults to vim if EDITOR isn't set, but vim isn't necessarily installed.

xlint doesn't catch harcoded versions in distfiles

xlint doesn't seem to catch the hardcoded versions in distfiles= when using it locally. It catches when submitting for PR just fine, though.

example:

gh0st@grey:~/projects/void/void-packages% xlint srcpkgs/python3-ReParser/template 
gh0st@grey:~/projects/void/void-packages% grep distfiles srcpkgs/python3-ReParser/template 
distfiles="${PYPI_SITE}/R/ReParser/ReParser-1.4.3.tar.gz"

xdistdir getting invisible characters

Found while using xbump, xdistdir internals look like so:

❯ cd "$($(readlink -f .//xbps-src) show-var XBPS_DISTDIR | tail -1)"  
cd: no such file or directory: ^[[m/home/dominic/src/github.com/void-linux/void-packages

'xlint' says strange things

#11397 🤐

System

  • xuname: Void 4.15.1_1 x86_64-musl GenuineIntel uptodate rFFFFFFFFFFFFFFF

  • package: xtools-0.49_1

Expected behavior

xlint should not complain about the make_check_target variable.

Actual behavior

xlint keeps complaining that make_check_target is a custom variable!

Steps to reproduce the behavior

I found this while I was trying to update expect to 5.45.4...

$ xlint srcpkgs/expect/template
srcpkgs/expect/template:14: custom variables should use _ prefix: make_check_target="test"

But why??
It should be correct, according to: common/build-style/gnu-configure.sh

#
# This helper is for templates using GNU configure scripts.
#
do_check() {
	if [ -z "$make_cmd" ] && [ -z "$make_check_target" ]; then 
		if make -q check 2>/dev/null; then
			:
		else
			if [ $? -eq 2 ]; then
				msg_warn 'No target to "make check".\n'
				return 0
			fi
		fi
	fi

	: ${make_cmd:=make}
	: ${make_check_target:=check}

	${make_cmd} ${make_check_args} ${make_check_target}
}

I can see ${make_check_target}

xlocate: git repo outdated check broken

$ rm -rf .cache/xlocate.git/
$ xlocate -S
Cloning into bare repository '/home/mg/.cache/xlocate.git'...
$ xlocate does_not_exists
find: ‘/home/mg/.cache/xlocate.git/refs/heads/master’: No such file or directory
$ 

xlint: check for var definitions outside the main block

I recently made a template for pp and I made a mistake there. I think it could be detected by xlint.

# Template file for 'pp'
pkgname=pp
version=1.0.1
revision=1
build_style=gnu-makefile
short_desc="Simple preprocessor"
maintainer='Michal V <[email protected]>'
license="ISC"
homepage="https://adi.tilde.institute/pp/"
distfiles="https://adi.tilde.institute/${pkgname}/${pkgname}-${version}.tgz"
checksum=90501faa2952223d3e1e3bdae94fe6e911b271678075fee792ba30cc8e3499e0

wrksrc="${pkgname}"

do_build() {
    make CC="$CC" LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS"
}

post_install() {
    vlicense LICENSE
    vdoc README
}

Notice that wrksrc is separated from the main block of variables. Xlint didn't detect that and didn't warn me about the wrong placement.

Xupdate

An auto update script that downloads the udpated version of libraries and fixes automatically version/revision/checksum. Right now i have a single hash version for myself.

** EDIT **

xupdate() {
        upd=$(./xbps-src update-check $1 | tr '-' '\n' | tail -n1)
        [ upd == "" ] && echo "package alredy updated" && exit 0
        sed -i "s/^version=.*/version=$upd/" "srcpkgs/$1/template"
        sed -i "s/^revision=.*/revision=1/"  "srcpkgs/$1/template"
        xgensum -i "srcpkgs/$1/template"
        xbump $1
}

xgensum should work

xlint: checkdepends is treated as a custom variable

checkdepends is used to mark dependencies that are used on do_check() and it is only installed if XBPS_CHECK_PKGS is set.

example output:

srcpkgs/rinse/template:8: custom variables should use _ prefix: checkdepends="perl-LWP wget rpm"

xlocate results are duplicated.

$ xlocate dvdread.pc
libdvdread-devel-32bit-6.0.1_3	/usr/lib32/pkgconfig/dvdread.pc
libdvdread-devel-6.0.1_3	/usr/lib/pkgconfig/dvdread.pc
libdvdread-devel-6.0.1_3	/usr/lib/pkgconfig/dvdread.pc

xpstree isn't 0755

total 188
-rw-r--r-- 1 terran terran  399 Mar 16 13:56 Makefile
-rw-r--r-- 1 terran terran 4364 Mar 16 13:56 README
-rw-r--r-- 1 terran terran 2986 Mar 16 13:56 _xtools
-rwxr-xr-x 1 terran terran  289 Mar 16 13:56 xbarf
-rwxr-xr-x 1 terran terran  198 Mar 16 13:56 xbuildbarf
-rwxr-xr-x 1 terran terran  662 Mar 16 13:56 xbulk
-rwxr-xr-x 1 terran terran  978 Mar 16 13:56 xbump
-rwxr-xr-x 1 terran terran  200 Mar 16 13:56 xcheckmypkgs
-rwxr-xr-x 1 terran terran  582 Mar 16 13:56 xcheckrestart
-rwxr-xr-x 1 terran terran 1194 Mar 16 13:56 xchroot
-rwxr-xr-x 1 terran terran  844 Mar 16 13:56 xclash
-rwxr-xr-x 1 terran terran  658 Mar 16 13:56 xdbg
-rwxr-xr-x 1 terran terran  387 Mar 16 13:56 xdiff
-rwxr-xr-x 1 terran terran  796 Mar 16 13:56 xdistdir
-rwxr-xr-x 1 terran terran  568 Mar 16 13:56 xdowngrade
-rwxr-xr-x 1 terran terran  464 Mar 16 13:56 xetcchanges
-rwxr-xr-x 1 terran terran  998 Mar 16 13:56 xgensum
-rwxr-xr-x 1 terran terran  223 Mar 16 13:56 xgrep
-rwxr-xr-x 1 terran terran  130 Mar 16 13:56 xhog
-rwxr-xr-x 1 terran terran 1125 Mar 16 13:56 xi
-rwxr-xr-x 1 terran terran  157 Mar 16 13:56 xilog
-rwxr-xr-x 1 terran terran  146 Mar 16 13:56 xlg
-rwxr-xr-x 1 terran terran 4764 Mar 16 13:56 xlint
-rwxr-xr-x 1 terran terran 2087 Mar 16 13:56 xlocate
-rwxr-xr-x 1 terran terran  103 Mar 16 13:56 xlog
-rwxr-xr-x 1 terran terran  409 Mar 16 13:56 xls
-rwxr-xr-x 1 terran terran  301 Mar 16 13:56 xmandoc
-rwxr-xr-x 1 terran terran  275 Mar 16 13:56 xmindep
-rwxr-xr-x 1 terran terran  315 Mar 16 13:56 xmksv
-rwxr-xr-x 1 terran terran  291 Mar 16 13:56 xmypkgs
-rwxr-xr-x 1 terran terran 1662 Mar 16 13:56 xnew
-rwxr-xr-x 1 terran terran  274 Mar 16 13:56 xnodev
-rwxr-xr-x 1 terran terran  669 Mar 16 13:56 xoptdiff
-rwxr-xr-x 1 terran terran 1022 Mar 16 13:56 xpkg
-rw-r--r-- 1 terran terran  221 Mar 16 13:59 xpstree
-rwxr-xr-x 1 terran terran  732 Mar 16 13:56 xq
-rwxr-xr-x 1 terran terran  699 Mar 16 13:56 xrecent
-rwxr-xr-x 1 terran terran  924 Mar 16 13:56 xrevbump
-rwxr-xr-x 1 terran terran  392 Mar 16 13:56 xrevshlib
-rwxr-xr-x 1 terran terran  395 Mar 16 13:56 xrs
-rwxr-xr-x 1 terran terran  275 Mar 16 13:56 xsrc
-rwxr-xr-x 1 terran terran  236 Mar 16 13:56 xsubpkg
-rw-r--r-- 1 terran terran 4817 Mar 16 13:56 xtools.1
-rwxr-xr-x 1 terran terran  795 Mar 16 13:56 xuname
-rwxr-xr-x 1 terran terran 1771 Mar 16 13:56 xvoidstrap

xmandoc loves symlinks

Or not.

I'll fix this later if @chneukirchen doesn't first.

$ xmandoc vim
xbps-query: invalid option -- '>'
xbps-query: invalid option -- '>'
xbps-query: invalid option -- '>'
xbps-query: invalid option -- '>'
$

which is successful.

Except:

$ xlocate /vim.1$
vim-common-8.0.0586_1   /usr/share/man/man1/rvim-view.1 -> /usr/share/man/man1/vim.1
vim-common-8.0.0586_1   /usr/share/man/man1/rvim.1 -> /usr/share/man/man1/vim.1
vim-common-8.0.0586_1   /usr/share/man/man1/vim-ex.1 -> /usr/share/man/man1/vim.1
vim-common-8.0.0586_1   /usr/share/man/man1/vim-view.1 -> /usr/share/man/man1/vim.1
vim-common-8.0.0586_1   /usr/share/man/man1/vim.1
$

which counts for those 4 failures.

xlint: alioth.debian.org

Whenever I try to download some distfile from alioth.debian.org, xlint complains I should use $DEBIAN_SITE, while alioth.debian.org is an entirely different location.

Until now I took the corresponding distfile from $DEBIAN_SITE/main/<p>/<pkgname>/<pkgname>_<version>.orig.tar.gz. This works as long as updates make it into debian's pool soon enough. Perhaps only complain for distfiles containing explicilty ftp.debian.org?

xgensum fails to modify checksum on R-cran-* packages

  1. change version of R-cran-* package ( will use stringi as example with update from 1.1.5 to 1.1.6 )
  2. xgensum -f -i srcpkgs/R-cran-stringi/template

Expected difference ( via git diff ):

diff --git a/srcpkgs/R-cran-stringi/template b/srcpkgs/R-cran-stringi/template
index 250ea849f7..15322599a2 100644
--- a/srcpkgs/R-cran-stringi/template
+++ b/srcpkgs/R-cran-stringi/template
@@ -1,6 +1,6 @@
 # Template file for 'R-cran-stringi'
 pkgname=R-cran-stringi
-version=1.1.5
+version=1.1.6
 revision=1
 build_style=R-cran
 makedepends+=" pkg-config icu-devel"
@@ -8,7 +8,7 @@ short_desc="Character String Processing Facilities"
 maintainer="Florian Wagner <[email protected]>"
 license="BSD"
 homepage="http://gagolewski.com/software/stringi/"
-checksum=651e85fc4ec6cf71ad8a4347f2bd4b00a490cf9eec20921a83bf5222740402f2
+checksum=9590360b96627b18d7bed273deedabda4283dbae7d41c0a0ba78a58e6aa95188
 
 post_install() {
 	vlicense LICENSE

Actual difference ( via git diff ):

diff --git a/srcpkgs/R-cran-stringi/template b/srcpkgs/R-cran-stringi/template
index 250ea849f7..2a573c5928 100644
--- a/srcpkgs/R-cran-stringi/template
+++ b/srcpkgs/R-cran-stringi/template
@@ -1,6 +1,6 @@
 # Template file for 'R-cran-stringi'
 pkgname=R-cran-stringi
-version=1.1.5
+version=1.1.6
 revision=1
 build_style=R-cran
 makedepends+=" pkg-config icu-devel"
@@ -8,7 +8,7 @@ short_desc="Character String Processing Facilities"
 maintainer="Florian Wagner <[email protected]>"
 license="BSD"
 homepage="http://gagolewski.com/software/stringi/"
-checksum=651e85fc4ec6cf71ad8a4347f2bd4b00a490cf9eec20921a83bf5222740402f2
+checksum=
 
 post_install() {
 	vlicense LICENSE

Happens to all R-cran packages i have bumped.

[ Feature request] : purge uninstalled `.xbps` files from `/var/cache/xbps` directory

Hi. and thank you for your great effort. I have a problem with xbps and it's that:
imagin you decide to install a package and after a while, you decide to delete it with:
sudo xbps-install -S foo.
Actually it doesn't delete .xbps files from: /var/cache/xbps and after some times if you install-uninstall some packages, your /var/cache/xbps directory will occupied with .xbps files that no longer related to any installed package on your machine.
I know we can go to that directory and start deleting packages one by one. it's easy for packages with low dependencies but imagine you install plasma-desktop or gnome with more than 150 dependencies.
How you can find them? absolutely it's time consuming and an error-prone process.
So i think there should be some script to do it for us automatically. I also said this problem here:
void-linux/xbps#156 (comment)
And @pullmoll offer me a script in last part. I tried it and it works. But i think it can be improved and then merged to your repo.

xnew segmentation fault

Hi. I have a segmentation fault error when creating a new package on Void linux.

xnew my-new-package

Got an error:

segmentation fault xnew my-new-package

Despite the error, the new directory have been created with template file inside.

image

image

xlint: use $SOURCEFORGE_SITE false positives

plib, pinfo, foremost, gxemul, liba52, libmpeg2, nilfs-utils trigger a use $SOURCEFORGE message.

These host their distfiles at $pkgname.sourceforge.net/* but these files are not available via the sourceforge project site.

Enforce license naming uniformity for BSD (and possibly others)

it is annoying and confusing to have so many variations of the same thing without reason, the most commonly used ( as show below can be enforced ) for minimal friction, going full spdx is costly in comparison.

2-clause-BSD: 81
2-Clause-BSD: 3
BSD (can't tell if 2 or 3 license just by the name itself): 328
BSD-2: 8

---

3-Clause-BSD: 5
3-clause-BSD: 174
BSD (can't tell if 2 or 3 license just by the name itself): 328
BSD-3-clause: 2
BSD-3: 9


scan 'license=.*(2-Clause-BSD|BSD-2|BSD-2-[C?c]lause)' 'license should be 2-clause-BSD'
scan 'license=.*(3-Clause-BSD|BSD-3|BSD-3-[C?c]lause)' 'license should be 3-clause-BSD'
scan 'license=.*BSD[^-]' "license BSD is ambiguous, use N-clause-BSD"

$ xlint srcpkgs/python-nose2/template srcpkgs/python-pytest-relaxed/template srcpkgs/rage-player/template
srcpkgs/python-nose2/template:12: license should be 2-clause-BSD
srcpkgs/python-pytest-relaxed/template:12: license should be 2-clause-BSD
srcpkgs/rage-player/template:12: license should be 2-clause-BSD

$ xg -l gyp
srcpkgs/gyp/template:12: license BSD is ambiguous, use N-clause-BSD

[idea] xpcdeps

a script that parses a pkg-config file Requires: section and returns the packages in voidlinux that provides the dependencies.

Will make life easier when making -devel packages. Putting the ${makedepends} might add some makedepends that are not really required, doing it by hand is error-prone.

Here is a script that takes a .pc filename and returns the packages and which dependency they fullfill.

#!/bin/sh
#
for str in "$@" ; do
	xlocate "usr/\(lib\|share\)/pkgconfig/$str.pc" |
	{ grep . || { echo "xpcdeps: No pkg-config file for $str found." 1>&2 ; exit 1; } } |
	while read -r pkg pcfile; do
		xbps-query --cat=$pcfile $pkg | grep Requires: | cut -d: -f2 | tr ' ' '\n' | while read -r pcpkg ; do
			xlocate "usr/\(lib\|share\)/pkgconfig/$pcpkg.pc" | while read -r pkgname pcfile ; do
				echo "${pkgname%-*} -> $pcpkg"
			done
		done
	done
done

yes i used basically 4 nested loops

#!/bin/sh
grab_requires() {
	for pkg in "$@" ; do
		xlocate "usr/\(lib\|share\)/pkgconfig/$pkg.pc" |
		{ grep . || { echo "xpcdeps: No pkg-config file for $pkg found." 1>&2 ; exit 1; } } |
		while read -r pkgname file ; do
			xbps-query --cat=$file ${pkgname%-*} | grep Requires: | cut -d: -f2 | tr ' ' '\n'
		done
	done
}

get_package_from_requires() {
	while read -r pkg ; do
		# This makes the iterator ignore over the version specifier available for pkg-config
		# >=, <=, >, <, =, and also ignore versions by expecting a single letter
		[ -z "${pkg##*=*}" ] && continue
		[ -z "${pkg##*<*}" ] && continue
		[ -z "${pkg##*>*}" ] && continue
		[ -z "${pkg##*[a-zA-Z]*}" ] || continue
		[ -z "$pkg" ] && continue
		xlocate "usr/\(lib\|share\)/pkgconfig/$pkg.pc" |
		{ grep . || { printf -- "UNKNOWN PKG PLEASE FIX -> %s\\n" "$pkg" 1>&2 ; continue; } } |
		while read -r pkgname file ; do
			file="${file##*/}"
			printf -- "%s -> %s\\n" "${pkgname%-*}" "${file%*.pc}"
		done
	done
}

grab_requires "$@" | get_package_from_requires```

helpmessage from `ln` when used without parameter or with --help

i added some checks to solve it:

#!/bin/sh -e
# xdowngrade PKGS.xbps... - install XBPS package directly from .xbps file
help() {
    echo "Install XBPS package directly from .xbps file."
    echo "usage: $0 PKGS.xbps ..."
    rm -r $T
    exit 0
}
T=$(mktemp --tmpdir -d xdowngrade-$(date -I).XXXXXXXX)
pkg=
for f; do
    case $f in
        *.xbps)
            ln -s -r -t $T/ "$f"
            f=${f##*/}
            f=${f%.*.*}
            pkg="$pkg ${f%-*}"
        ;;
        *)
            echo "Wrong argument $f."
            help
        ;;
    esac
done
if [ ! -z "$pkg" ]; then
    xbps-rindex -a $T/*
    xbps-install -i -R $T -f $pkg
else
    help
fi
rm -r $T
exit 0

xlint: complains when short_desc is exactly 72 chars long

I'm writing a personal template for STIXFonts (though it's irrelevant what package it's checking) and my short_desc is exactly 72 chars long. No periods at the end I'm not counting or anything. When running xlint I get this:

srcpkgs/stixfonts/template:8: short_desc should be less than 72 chars

Here's the short_desc itself:

short_desc="OpenType Unicode fonts for Scientific, Technical, and Mathematical texts"

Is xlint counting the ending quote as being part of the description?


after writing this it occured to me that xlint is saying less than, not less than or equal to but I still it's worth asking

license suggestion

I was looking at xtools when I noticed your license, some licenses (see MIT) attempt to protect you from litigation, it may be an idea to add a similar clause to your license or even change to something like the MIT one, there are bottom feeders out there who will make false accusations, just to see what they can get...

xlocate --help prints git-grep manpage

Pretty sure this isn't intended behavior...

$ xlocate --help
GIT-GREP(1) Git Manual GIT-GREP(1)
N�NA�AM�ME�E
git-grep - Print lines matching a pattern
S�SY�YN�NO�OP�PS�SI�IS�S
_�g_�i_�t _�g_�r_�e_�p [-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp]
[-v | --invert-match] [-h|-H] [--full-name]
[-E | --extended-regexp] [-G | --basic-regexp]
[-P | --perl-regexp]
[-F | --fixed-strings] [-n | --line-number]
[-l | --files-with-matches] [-L | --files-without-match]
[(-O | --open-files-in-pager) []]
[-z | --null]
[-c | --count] [--all-match] [-q | --quiet]
[--max-depth ]
[--color[=] | --no-color]
[--break] [--heading] [-p | --show-function]
[-A ] [-B ] [-C ]
[-W | --function-context]
[--threads ]
[-f ] [-e]
[--and|--or|--not|(|)|-e ...]
[ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | ...]
[--] [...]
D�DE�ES�SC�CR�RI�IP�PT�TI�IO�ON�N
Look for specified patterns in the tracked files in the work tree,
blobs registered in the index file, or blobs in given tree objects.
Patterns are lists of one or more search expressions separated by
newline characters. An empty string as search expression matches all
lines.
C�CO�ON�NF�FI�IG�GU�UR�RA�AT�TI�IO�ON�N
grep.lineNumber
If set to true, enable -�-n�n option by default.
...

It would appear that this is actually a mistake on my part, thinking that xlocate would have a help option. instead, --help just gets passed to the git grep invocation.

xi support for non-free sub-repo

Would support for --repository=hostdir/binpkgs/$BRANCH/nonfree etc. be a welcome addition? As nonfree is the only repo right now, and packages in the non-free repo bulld into that directory.

xlocate finds more than it bargains for

$ xlocate -S
$ xlocate usr/lib/pkgconfig/gudev-1.0.pc
faenza-icon-theme-1.3.1_1	/usr/share/icons/Faenza/apps/22/leafpad.png libgudev-devel-232_1: /usr/lib/pkgconfig/gudev-1.0.pc

Typos in man doc

In the doc for xlocate, "man xtools" returns

...
-S Sync the with the official git based xlocate database
...

You probably mean "-S Sync the database with the official git based xlocate database" or something like that.

Remove dmesg error output from xuname

Whenever I run xuname I receive the following error as my normal user is not allowed to read the kernel messages:

dmesg: read kernel buffer failed: Operation not permitted
Void 4.19.67_1 x86_64 GenuineIntel notuptodate rrrmFFFFFF

Can this line be fixed to not return this error?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.