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@X86 -> pkg@i586 i586-pkg@x86_64
Date: Wed, 14 Mar 2018 08:03:55 +0300
Message-ID: <20180314050354.GA21344@imap.altlinux.org> (raw)

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

	Здравствуйте.
Приложенный патч, который ожидается в mkimage-profiles 1.2.12
при отсутствии возражений, реализует возможность описанного
в теме письма сокращения -- вместо типовой комбинации

  pkg@i586 i586-pkg@x86_64

можно написать куда более читабельное

  pkg@X86

(хоть один раз на строчку, хоть несколько вперемешку с другими).

Нечто подобное предлагал zerg@, но мне не удалось быстро найти
ту переписку или вспомнить, предлагал ли он точный синтаксис.
Потому и прошу отзывов :)

PS: в m-p-d это выглядело так:

    @I586_ONLY@pkg
    @X86_64_ONLY@i586-pkg

PPS: думаю над расширением синтаксиса в сторону !arch --
в sisyphus/e2k всё так же нет thunderbird и многого подобного.

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

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

>From e1d894dfe14205e96a19d247a94c4497e03f9678 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 @X86 archdep macro

This 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@X86

is rather more clear than

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

so here's the (trivial) implementation.
---
 doc/archdep.txt       | 4 ++++
 pkg.in/lists/Makefile | 3 ++-
 pkg.in/lists/README   | 3 +++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/doc/archdep.txt b/doc/archdep.txt
index 6383e37..085a0f2 100644
--- a/doc/archdep.txt
+++ b/doc/archdep.txt
@@ -40,6 +40,10 @@
   haspd@i586
   i586-haspd@x86_64
 
+или упрощённо (с версии 1.2.12):
+
+  haspd@X86
+
 Для преобразования можно воспользоваться следующей командой:
 
   sed -r -e 's/@I586_ONLY@([^\t ]+)/\1@i586/g' \
diff --git a/pkg.in/lists/Makefile b/pkg.in/lists/Makefile
index e112e4f..9fe84b6 100644
--- a/pkg.in/lists/Makefile
+++ b/pkg.in/lists/Makefile
@@ -40,8 +40,9 @@ grep-archdep:
 	@# xargs -L 1024 -n 1024 ? -- breaks -I
 	@find $(TARGET) -type f \
 	| xargs -I '__' sh -c '\
+		sed -ri  "s/\\<([^@ ]*)@X86\\>/\\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:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14  5:03 Michael Shigorin [this message]
2018-03-14  5:45 ` [devel-distro] не, A: pkg@IA32, pkg@X86 Michael Shigorin
2018-03-14  6:53   ` 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=20180314050354.GA21344@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