ALT Linux Distributions development
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@altlinux.org>
To: devel-distro@lists.altlinux.org
Subject: [devel-distro] не, A: pkg@IA32, pkg@X86
Date: Wed, 14 Mar 2018 08:45:22 +0300
Message-ID: <20180314054522.GA21886@imap.altlinux.org> (raw)
In-Reply-To: <20180314050354.GA21344@imap.altlinux.org>

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

On Wed, Mar 14, 2018 at 08:03:55AM +0300, I wrote:
> Приложенный патч, который ожидается в mkimage-profiles 1.2.12

Уже не ожидается.  Ожидается приложенный к этому письму :)

До меня всё-таки дошло, что zerg@ спрашивал про штуку,
которая теперь названа @IA32 ("32-битный x86-пакет,
названный так, как принято в репозиториях для выбранной
целевой платформы") -- а мне с утра пораньше понадобилась
чуть другая штука, которая обеспечит включение заданного
пакета на любой x86-архитектуре, но только на x86.

-- 
 ---- WBR, Michael Shigorin / http://altlinux.org
  ------ http://opennet.ru / http://anna-news.info

[-- Attachment #2: 0001-lists-doc-introduce-IA32-X86-archdep-macros.patch --]
[-- Type: text/x-patch, Size: 2656 bytes --]

>From 2d257a425b9e9f49483559857c4e894d1743aa72 Mon Sep 17 00:00:00 2001
From: Michael Shigorin <mike@altlinux.org>
Date: Wed, 14 Mar 2018 07:55:42 +0300
Subject: [PATCH] lists, doc: introduce @IA32, @X86 archdep macros

The former ("proper 32-bit x86 package form") has been suggested
by zerg@ quite some time ago but the desired interface wasn't clear
at the moment IIRC; a quiet morning helped me realize that

  ICAClient-preinstall@IA32

is rather more readable than

  ICAClient-preinstall@i586 i586-ICAClient-preinstall@x86_64

so here's the (trivial) implementation; and I actually needed
the latter, @X86 ("any-x86") to mark x86-only packages so

  xorg-drv-intel@X86

is now equivalent to

  xorg-drv-intel@i586 xorg-drv-intel@x86_64
---
 doc/archdep.txt       | 9 +++++++++
 pkg.in/lists/Makefile | 4 +++-
 pkg.in/lists/README   | 3 +++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/doc/archdep.txt b/doc/archdep.txt
index 6383e37..c9ecddd 100644
--- a/doc/archdep.txt
+++ b/doc/archdep.txt
@@ -40,7 +40,16 @@
   haspd@i586
   i586-haspd@x86_64
 
+или упрощённо (с версии 1.2.12):
+
+  haspd@IA32
+
 Для преобразования можно воспользоваться следующей командой:
 
   sed -r -e 's/@I586_ONLY@([^\t ]+)/\1@i586/g' \
          -e 's/@X86_64_ONLY@([^\t ]+)/\1@x86_64/g'
+
+При необходимости добавить пакет только на x86-архитектурах (неважно,
+i586 или x86_64) можно воспользоваться макросом X86 (с версии 1.2.12):
+
+  xorg-drv-intel@X86
diff --git a/pkg.in/lists/Makefile b/pkg.in/lists/Makefile
index e112e4f..02bc67e 100644
--- a/pkg.in/lists/Makefile
+++ b/pkg.in/lists/Makefile
@@ -40,8 +40,10 @@ grep-archdep:
 	@# xargs -L 1024 -n 1024 ? -- breaks -I
 	@find $(TARGET) -type f \
 	| xargs -I '__' sh -c '\
+		sed -ri  "s/\\<([^@ ]*)@X86\\>/\\1@i586 \\1@x86_64/g" __; \
+		sed -ri  "s/\\<([^@ ]*)@IA32\\>/\\1@i586 i586-\\1@x86_64/g" __;\
 		sed -rni "s/\\<([^@ ]*)\\>|\\<([^@ ]*)@$a\\>/\\1\\2/pg" __; \
-		sed -i -r "s/\\<([^@ ]*)@[^@ ]+\\> *//g" __'
+		sed -ri  "s/\\<([^@ ]*)@[^@ ]+\\> *//g" __'
 
 # do beforehand as foreach gets expanded before recipe execution
 $(TARGET):
diff --git a/pkg.in/lists/README b/pkg.in/lists/README
index 21719a0..9e4602e 100644
--- a/pkg.in/lists/README
+++ b/pkg.in/lists/README
@@ -16,6 +16,9 @@
 устойчивые группы пакетов могут заслуживать выделения отдельным
 списком.
 
+При копировании списков в BUILDROOT происходит их обработка
+с применением архитектурнозависимых макросов, см. doc/archdep.txt
+
 NB: списки пакетов есть смысл выделять в файлы при повторном
 использовании либо при заметном объёме, когда перечисление
 прямо в конфигурации сильно снижает её читаемость.
-- 
2.10.4


  reply	other threads:[~2018-03-14  5:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14  5:03 [devel-distro] A: pkg@X86 -> pkg@i586 i586-pkg@x86_64 Michael Shigorin
2018-03-14  5:45 ` Michael Shigorin [this message]
2018-03-14  6:53   ` [devel-distro] не, A: pkg@IA32, pkg@X86 Sergey V Turchin
2018-03-14  8:56     ` Michael Shigorin
2018-03-14  9:39       ` Sergey V Turchin
2018-03-19 20:16       ` Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180314054522.GA21886@imap.altlinux.org \
    --to=mike@altlinux.org \
    --cc=devel-distro@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Distributions development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-distro/0 devel-distro/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-distro devel-distro/ http://lore.altlinux.org/devel-distro \
		devel-distro@lists.altlinux.org devel-distro@lists.altlinux.ru devel-distro@lists.altlinux.com
	public-inbox-index devel-distro

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-distro


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git