ArchのAURからgnome-shell-extension-commonのインストール中にエラーが発生しました。

ArchのAURからgnome-shell-extension-commonのインストール中にエラーが発生しました。

私はArch Linuxを初めて使用し、Gnome Tweak Tool用のgnome-shell-extension-user-themeをインストールして、Gnome Shellにテーマを適用したいと思いました。ただし、AURでgnome-shell-extension-common-gitをビルドしようとすると、エラーが発生し続けます。バージョン番号にはハイフンが含まれていますが、PKGBUILDを編集すると再作成されます。

私は走る:

yaourt gnome-shell-extension-common-git

PKGBUILDの内容を表示します。

# Maintainer: Alucryd <alucryd at gmail dot com>
# Contributor: Sebastian Lenz <[email protected]>

pkgname=gnome-shell-extension-common-git
pkgver=3.8.1.7
pkgrel=1
pkgdesc="Common files for the GNOME Shell Extensions"
arch=('any')
url="http://live.gnome.org/GnomeShell/Extensions"
license=('GPL' 'LGPL')
depends=('gnome-shell')
makedepends=('git' 'gnome-common' 'intltool')
provides=('gnome-shell-extension-common')
conflicts=('gnome-shell-extension-git' 'gnome-shell-extension-common')
source=('git+http://git.gnome.org/browse/gnome-shell-extensions#branch=gnome-3-8')
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}"/gnome-shell-extensions

  git describe | sed 's|\(.*-.*\)-.*|\1|;s|-|.|'
}

build() {
  cd "${srcdir}"/gnome-shell-extensions

  ./autogen.sh --prefix=/usr --disable-schemas-compile --enable-extensions=""
  make
}

package() {
  cd "${srcdir}"/gnome-shell-extensions

  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:

ビルド時にエラーが発生します。

==> Starting pkgver()...
==> Updated version: gnome-shell-extension-common-git 3.8.3.1.real-2-1
==> ERROR: pkgver is not allowed to contain colons, hyphens or whitespace.
==> ERROR: Makepkg was unable to build gnome-shell-extension-common-git.
==> Restart building gnome-shell-extension-common-git ? [y/N]

PKGBUILDの新機能:

# Maintainer: Alucryd <alucryd at gmail dot com>
# Contributor: Sebastian Lenz <[email protected]>

pkgname=gnome-shell-extension-common-git
pkgver=3.8.3.1.real-2
pkgrel=1
pkgdesc="Common files for the GNOME Shell Extensions"
arch=('any')
url="http://live.gnome.org/GnomeShell/Extensions"
license=('GPL' 'LGPL')
depends=('gnome-shell')
makedepends=('git' 'gnome-common' 'intltool')
provides=('gnome-shell-extension-common')
conflicts=('gnome-shell-extension-git' 'gnome-shell-extension-common')
source=('git+http://git.gnome.org/browse/gnome-shell-extensions#branch=gnome-3-8')
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}"/gnome-shell-extensions

  git describe | sed 's|\(.*-.*\)-.*|\1|;s|-|.|'
}

build() {
  cd "${srcdir}"/gnome-shell-extensions

  ./autogen.sh --prefix=/usr --disable-schemas-compile --enable-extensions=""
  make
}

package() {
  cd "${srcdir}"/gnome-shell-extensions

  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:

ハイフンを削除するためにファイルを編集すると、再構築しようとすると再度追加されるため、違いはありません。

ベストアンサー1

変化

git describe | sed 's|\(.*-.*\)-.*|\1|;s|-|.|'

到着

git describe | sed 's|\(.*-.*\)-.*|\1|;s|-|.|g'

パッケージのバージョンには最初にハイフンがあります。ビルドしているバージョンには2つのハイフンがあります。 (replace) を使用すると、1 つgの一致ではなく複数の一致が置き換えられます。ssed

おすすめ記事