* [devel] diff in .gear-rules @ 2008-10-17 11:54 Grigory Batalov 2008-10-17 14:26 ` Andrey Rahmatullin 2008-10-17 14:45 ` Pavel Wolneykien 0 siblings, 2 replies; 7+ messages in thread From: Grigory Batalov @ 2008-10-17 11:54 UTC (permalink / raw) To: devel [-- Attachment #1: Type: text/plain, Size: 199 bytes --] Здравствуйте! Можно ли заставить директиву diff из .gear-rules игнорировать появление новых файлов? Т.е. вместо "diff -ruN" запускать "diff -ru". И если нельзя, то как сделать, чтобы было можно? =) [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] diff in .gear-rules 2008-10-17 11:54 [devel] diff in .gear-rules Grigory Batalov @ 2008-10-17 14:26 ` Andrey Rahmatullin 2008-10-17 20:45 ` Grigory Batalov 2008-10-17 14:45 ` Pavel Wolneykien 1 sibling, 1 reply; 7+ messages in thread From: Andrey Rahmatullin @ 2008-10-17 14:26 UTC (permalink / raw) To: devel [-- Attachment #1: Type: text/plain, Size: 509 bytes --] On Fri, Oct 17, 2008 at 03:54:39PM +0400, Grigory Batalov wrote: > Можно ли заставить директиву diff из .gear-rules игнорировать появление > новых файлов? Т.е. вместо "diff -ruN" запускать "diff -ru". > И если нельзя, то как сделать, чтобы было можно? =) А зачем? По-моему, это противоречит основной идее. -- WBR, wRAR (ALT Linux Team) Powered by the ALT Linux fortune(8): > народ, а какой параметр можно указать в загрузчике, чтобы > система загрузилась в init 1. 1 -- genix in community@ [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] diff in .gear-rules 2008-10-17 14:26 ` Andrey Rahmatullin @ 2008-10-17 20:45 ` Grigory Batalov 2008-10-17 20:55 ` Dmitry V. Levin 0 siblings, 1 reply; 7+ messages in thread From: Grigory Batalov @ 2008-10-17 20:45 UTC (permalink / raw) To: devel [-- Attachment #1: Type: text/plain, Size: 1030 bytes --] On Fri, 17 Oct 2008 20:26:42 +0600, Andrey Rahmatullin wrote: > > Можно ли заставить директиву diff из .gear-rules игнорировать появление > > новых файлов? Т.е. вместо "diff -ruN" запускать "diff -ru". > > И если нельзя, то как сделать, чтобы было можно? =) > А зачем? По-моему, это противоречит основной идее. Идея идее рознь. Одной идее противоречишь, другой следуешь. Смысл затеи в следующем: Допустим, есть бранч с исходниками (source), пофайлово побитый ещё на несколько (branch1 и branch2). source `- branch1 `- branch2 Я хочу вносить изменения в source, не заботясь о том, в каком из бранчей находится конкретный файл, а вместо этого формируя diff между исходным бранчем branch{1,2} и пропатченными исходниками. source |`- patched `- branch1 `- branch2 .gear-rules: diff: branch1:. patched:. name=1.patch diff: branch2:. patched:. name=2.patch Но при этом в 1.patch помимо изменённых попадут файлы, отсутстствовавшие в branch1, а в 2.patch - в branch2. (Допустим пока, что я сам не кладу новых файлов в patched.) [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] diff in .gear-rules 2008-10-17 20:45 ` Grigory Batalov @ 2008-10-17 20:55 ` Dmitry V. Levin 2008-10-17 21:13 ` Grigory Batalov 0 siblings, 1 reply; 7+ messages in thread From: Dmitry V. Levin @ 2008-10-17 20:55 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 1029 bytes --] On Sat, Oct 18, 2008 at 12:45:24AM +0400, Grigory Batalov wrote: [...] > Допустим, есть бранч с исходниками (source), пофайлово побитый > ещё на несколько (branch1 и branch2). > > source > `- branch1 > `- branch2 > > Я хочу вносить изменения в source, не заботясь о том, в каком > из бранчей находится конкретный файл, а вместо этого формируя > diff между исходным бранчем branch{1,2} и пропатченными исходниками. > > source > |`- patched > `- branch1 > `- branch2 > > .gear-rules: > diff: branch1:. patched:. name=1.patch > diff: branch2:. patched:. name=2.patch > > Но при этом в 1.patch помимо изменённых попадут файлы, > отсутстствовавшие в branch1, а в 2.patch - в branch2. > (Допустим пока, что я сам не кладу новых файлов в patched.) Если branch1 и branch2 пересекаются по файлам, то это не будет работать. А если branch1 и branch2 не пересекаются по каталогам, то проще написать diff: branch1:dir1 patched:dir1 name=1.patch diff: branch2:dir2 patched:dir2 name=2.patch -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] diff in .gear-rules 2008-10-17 20:55 ` Dmitry V. Levin @ 2008-10-17 21:13 ` Grigory Batalov 0 siblings, 0 replies; 7+ messages in thread From: Grigory Batalov @ 2008-10-17 21:13 UTC (permalink / raw) To: devel [-- Attachment #1: Type: text/plain, Size: 1408 bytes --] On Sat, 18 Oct 2008 00:55:53 +0400, Dmitry V. Levin wrote: > > Допустим, есть бранч с исходниками (source), пофайлово побитый > > ещё на несколько (branch1 и branch2). > > > > source > > `- branch1 > > `- branch2 > > > > Я хочу вносить изменения в source, не заботясь о том, в каком > > из бранчей находится конкретный файл, а вместо этого формируя > > diff между исходным бранчем branch{1,2} и пропатченными исходниками. > > > > source > > |`- patched > > `- branch1 > > `- branch2 > > > > .gear-rules: > > diff: branch1:. patched:. name=1.patch > > diff: branch2:. patched:. name=2.patch > > > > Но при этом в 1.patch помимо изменённых попадут файлы, > > отсутстствовавшие в branch1, а в 2.patch - в branch2. > > (Допустим пока, что я сам не кладу новых файлов в patched.) > > Если branch1 и branch2 пересекаются по файлам, то это не будет работать. > А если branch1 и branch2 не пересекаются по каталогам, По файлам не пересекаются, а по каталогам пересекаются (как я это понимаю): texmf-dist/tex/generic/texdraw/* - в одном бранче texmf-dist/tex/generic/qpxqtx/* - в другом > то проще написать > > diff: branch1:dir1 patched:dir1 name=1.patch > diff: branch2:dir2 patched:dir2 name=2.patch Наверное, если изменений было немного, их можно все перечислить =) diff: branch1:texmf-dist/tex/generic/texdraw patched:texmf-dist/tex/generic/texdraw name=texdraw.patch Однако, однажды их может стать много. [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] diff in .gear-rules 2008-10-17 11:54 [devel] diff in .gear-rules Grigory Batalov 2008-10-17 14:26 ` Andrey Rahmatullin @ 2008-10-17 14:45 ` Pavel Wolneykien 2008-10-17 20:08 ` Konstantin Baev 1 sibling, 1 reply; 7+ messages in thread From: Pavel Wolneykien @ 2008-10-17 14:45 UTC (permalink / raw) To: ALT Linux Team development discussions Grigory Batalov <bga@altlinux.org> wrote: > Можно ли заставить директиву diff из .gear-rules игнорировать появление > новых файлов? Т.е. вместо "diff -ruN" запускать "diff -ru". > И если нельзя, то как сделать, чтобы было можно? =) Пользуясь случаем, хочу поделиться опытом, как я вчера бэкпортировал xlock. Значит дело было так. * * * Жил был репозиторий и было у него 3 бранча: upstream add-icons pam.d В первом лежали исходные файлы заморские, с tux.org взятые, версии 5.27. В втором иконки расписные, разных размеров. А в третьем файлы конфигурационные большой важности. И было у Апстрима два сына: -- upstream |-- fix-install-mode |-- pam-integration И хранили они копии файлов, доставшихся им от отца. Первый сын был по натуре консерватором и только один файл у него был изменён для лучшей установки. А второй сын потокал прогрессу и новый код добавил сразу в три файла. И настало время сборки и пришёл тогда Повелитель. * master upstream fix-install-mode pam-integration add-icons pam.d Расставил он теги по бранчам, обозначив тем самым кому на сборку приходить. upstream v5.27 fix-install-mode imode-5.27 pam-integration pam-integ-1.0 add-icons icons-1.0 pam.d pam.d-1.0 И взял он тогда Шестерни могучие и приказал им: tar.gz: v@version@:xlockmore tar.gz: icons-1.0:icons name=@name@-@version@-icons tar: pam.d-1.0:pam.d name=@name@-@version@-pam.d diff: v@version@:xlockmore imode-5.27:xlockmore name=install-mode.patch diff: v@version@:xlockmore pam-integ-1.0:xlockmore name=pam-integration.patch Словом "@version@" значение "5.27" обозначив. Заскрежетали Шестерни и остановились, сказав: "Tag is not an ancestor of current HEAD". Взял тогда Повелитель и соединил всех кого отметил вместе, и заключил в себе: * master: v5.27--icons-1.0--pam.d-1.0--imode-5.27--pam-integ-1.0--HEAD Завертелись тогда Шестерни и собрался пакет новёхонький, пропатченный. Прошёл день, два и захотелось собрать пакет старый, надёжный, но тоже на манер нового пропатченный. И появился тогда в репозитории новый бранч в который были записаны исходные файлы старые, проверенные: * branch-4.0 v5.22 master upstream v5.27 fix-install-mode imode-5.27 pam-integration pam-integ-1.0 add-icons icons-1.0 pam.d pam.d-1.0 И задумал Четвёртый как Повелитель, всё в себе объединить. Сначала взял он "icons-1.0" и "pam.d-1.0", и возрадовался уже, так всё у него шло хорошо! Но вот пришёл к нему "imode-5.27" и захлестнула бедного Четвёртого волна изменений конфликтных, и сгинул он под ней! И решено тогда было на помощь премудрость машинную призвать. И снова появился Четвёртый, но не сам по себе, а как потомок Апстрима: master upstream v5.27 fix-install-mode imode-5.27 pam-integration pam-integ-1.0 * branch-4.0 add-icons icons-1.0 pam.d pam.d-1.0 Имел новый Четвёртый слабость к версиям старым, надёжным. Поэтому заменил он множество новых файлов, доставшихся ему от отца, старыми, понизив версию дистрибутива до 5.22, о чём провозгласил, тег установив с аннотацией в красочной рамке. * branch-4.0 v5.22. Дальше нужно ему было в себе всех своих братьев и друзей объединить, к сборке готовясь. Сначала как и прежде, взял он "icons-1.0" и "pam.d-1.0", которые влились в него без возражений. И вот подошёл "imode-5.27", но будучи братом кровным Четвёртого, только отличие своё от отца ему передал, сработала премудрость машинная! Четвёртый обозначил этот знаменательный момент тегом "v5.22-p0". Другой его брат, "pam-integ-1.0" так же поступить хотел, и лишь небольшой конфликт у них возник. Поспорили братья немного и помирились, свою дружбу другим тегом отметив: "v5.22-p1". Так Четвёртый, подобно Повелителю, объединил в себе всех для сборки отобранных: * branch-4.0: v5.27--(v5.22)--icons-1.0--pam.d-1.0--imode-5.27(v5.22-p0)--pam-integ-1.0(v5.22-p1)--HEAD И взял он Шестерни могучие и приказал им: tar.gz: v@version@:xlockmore tar.gz: icons-1.0:icons name=@name@-@version@-icons tar: pam.d-1.0:pam.d name=@name@-@version@-pam.d diff: v@version@:xlockmore v@version@-p0:xlockmore name=install-mode.patch diff: v@version@-p0:xlockmore v@version@-p1:xlockmore name=pam-integration.patch Словом "@version@" значение "5.22" обозначив. И завертелись Шестерни, и последовательно между собой теги сравнивая, патчей наделали. И не было в тех патчах ничего лишнего, и накатились они славно. И собрался пакет, хоть и старый, но надёжный, с новыми заплатами. С тех пор так и повелось. Если какому сыну захотелось пакет собрать, он братьев своих к себе на пир созывает, с каждым спорит, но неизменно мириться и тег устанавливает. Шестерни потом с этих тегов патчи творят, последовательно их между собой сравнивая. И выходят у них пакеты славные. А чужаку со стороны так пакет не в жизнь не собрать! * * * Вот собственно и всё. Не уверен что это универсальный и вообще верный рецепт, но я вчера использовал именно его. Результат можно увидеть в /people/manowar/xlockmore.git. Поддержку и конструктивную критику приму с радостью! Павел. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [devel] diff in .gear-rules 2008-10-17 14:45 ` Pavel Wolneykien @ 2008-10-17 20:08 ` Konstantin Baev 0 siblings, 0 replies; 7+ messages in thread From: Konstantin Baev @ 2008-10-17 20:08 UTC (permalink / raw) To: ALT Linux Team development discussions Pavel Wolneykien пишет: > ... > > Вот собственно и всё. Не уверен что это универсальный и вообще верный > рецепт, но я вчера использовал именно его. Результат можно увидеть в > /people/manowar/xlockmore.git. Поддержку и конструктивную критику приму > с радостью! > > Павел. > Супер! В мемориз. Надо бы примерами команд снабдить и на altlinux.org выложить, тогда вообще цены не будет! :) -- Konstantin Baev kipruss@altlinux.org ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-10-17 21:13 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-10-17 11:54 [devel] diff in .gear-rules Grigory Batalov 2008-10-17 14:26 ` Andrey Rahmatullin 2008-10-17 20:45 ` Grigory Batalov 2008-10-17 20:55 ` Dmitry V. Levin 2008-10-17 21:13 ` Grigory Batalov 2008-10-17 14:45 ` Pavel Wolneykien 2008-10-17 20:08 ` Konstantin Baev
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git