* [devel] I: girar-import - import package from /gears or /srpms
@ 2009-07-17 10:15 Alexey I. Froloff
2009-07-17 10:35 ` Evgeny Sinelnikov
2009-07-17 10:58 ` Terechkov Evgenii
0 siblings, 2 replies; 10+ messages in thread
From: Alexey I. Froloff @ 2009-07-17 10:15 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1.1: Type: text/plain, Size: 411 bytes --]
Прошу потестировать утилитку. Принимает два аргумента, имя
бинарного репозитария (girar-acl --list) и имя пакета.
Сначала оно пытается склонировать репозитарий
/gears/P/PACKAGE.git, если это не удаётся, пытается клонировать
/srpms/P/PACKAGE.git. В склонированном локально репозитарии
ветка master отбранчивается от ветки, соответствующей
заданному бинарному репозитарию.
--
Regards,
Sir Raorn.
[-- Attachment #1.2: girar-import --]
[-- Type: text/plain, Size: 2593 bytes --]
#!/bin/sh -efu
#
# Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
. girar-client-sh-functions
show_help()
{
cat <<EOF
Usage: $PROG [Options] <repository> <package>
$PROG imports old package from archive.
$PROG uses the git configuration file. The following variables are read:
* girar.remote, corresponding to --remote
Options:
-R,--remote girar server alias, defaults to git.alt
-q,--quiet try to be more quiet;
-v,--verbose print a message for each action;
-V,--version print program version and exit;
-h,--help show this text and exit.
Report bugs to http://bugs.altlinux.ru/
EOF
exit
}
print_version()
{
cat <<EOF
$PROG version $PROG_VERSION
Written by Alexey I. Froloff <raorn@altlinux.org>
Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EOF
exit
}
TEMP=`getopt -n $PROG -o R,q,v,V,h \
-l remote:,quiet,verbose,version,help -- "$@"` ||
show_usage
eval set -- "$TEMP"
while :; do
case "$1" in
-R|--remote) shift; girar_remote="$1";;
-q|--quiet) quiet=-q;;
-v|--verbose) verbose=-v;;
-V|--version) print_version;;
-h|--help) show_help;;
--) shift; break;;
*) fatal "unrecognized option: $1";;
esac
shift
done
[ $# -eq 2 ] || show_usage
repo="$1" && shift
package="$1" && shift
ackage="${package#?}"
p="${package%$ackage}"
git clone $verbose $quiet -o "gears" "$girar_remote:/gears/$p/$package.git" ||
git clone $verbose $quiet -o "srpms" "$girar_remote:/srpms/$p/$package.git" ||
fatal "Unable to clone package \`$package'"
cd "$package" ||
fatal "Package successfully cloned, but \`$package' directory unavailable"
git checkout $quiet -f -b master "$repo" ||
fatal "Unable to checkout branch \`$repo'"
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [devel] I: girar-import - import package from /gears or /srpms
2009-07-17 10:15 [devel] I: girar-import - import package from /gears or /srpms Alexey I. Froloff
@ 2009-07-17 10:35 ` Evgeny Sinelnikov
2009-07-17 10:44 ` Alexey I. Froloff
2009-07-17 10:58 ` Terechkov Evgenii
1 sibling, 1 reply; 10+ messages in thread
From: Evgeny Sinelnikov @ 2009-07-17 10:35 UTC (permalink / raw)
To: ALT Linux Team development discussions
17 июля 2009 г. 14:15 пользователь Alexey I. Froloff
(raorn@altlinux.org) написал:
> Прошу потестировать утилитку. Принимает два аргумента, имя
> бинарного репозитария (girar-acl --list) и имя пакета.
>
> Сначала оно пытается склонировать репозитарий
> /gears/P/PACKAGE.git, если это не удаётся, пытается клонировать
> /srpms/P/PACKAGE.git. В склонированном локально репозитарии
> ветка master отбранчивается от ветки, соответствующей
> заданному бинарному репозитарию.
>
Полезная штука... Наверное её в girar-utils стоит добавить..
Нашёл такую странность:
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'git.alt' which can not be resolved as commit?
girar-import: Unable to checkout branch `git.alt'
Там, в конце, какой-то странный код.
--
Sin (Sinelnikov Evgeny)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [devel] I: girar-import - import package from /gears or /srpms
2009-07-17 10:35 ` Evgeny Sinelnikov
@ 2009-07-17 10:44 ` Alexey I. Froloff
2009-07-17 10:57 ` Evgeny Sinelnikov
2009-07-17 11:19 ` Terechkov Evgenii
0 siblings, 2 replies; 10+ messages in thread
From: Alexey I. Froloff @ 2009-07-17 10:44 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
On Fri, Jul 17, 2009 at 02:35:22PM +0400, Evgeny Sinelnikov wrote:
> Полезная штука... Наверное её в girar-utils стоит добавить..
Туда и пойдёт.
> Нашёл такую странность:
> fatal: git checkout: updating paths is incompatible with switching branches.
> Did you intend to checkout 'git.alt' which can not be resolved as commit?
> girar-import: Unable to checkout branch `git.alt'
Er... Что такое git.alt? Первым аргументом надо указывать
бинарный репозитарий:
$ girar-remote acl --list
sisyphus
5.0
4.1
4.0
> Там, в конце, какой-то странный код.
В архиве нет ветки "master", есть ветки на каждый бинарный
репозитарий. "В конце" создаётся ветка master от последнего
коммита в ветку соответствующего репозитария.
--
Regards,
Sir Raorn.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [devel] I: girar-import - import package from /gears or /srpms
2009-07-17 10:44 ` Alexey I. Froloff
@ 2009-07-17 10:57 ` Evgeny Sinelnikov
2009-07-17 10:58 ` Evgeny Sinelnikov
2009-07-17 11:19 ` Terechkov Evgenii
1 sibling, 1 reply; 10+ messages in thread
From: Evgeny Sinelnikov @ 2009-07-17 10:57 UTC (permalink / raw)
To: ALT Linux Team development discussions
17 июля 2009 г. 14:44 пользователь Alexey I. Froloff
(raorn@altlinux.org) написал:
> On Fri, Jul 17, 2009 at 02:35:22PM +0400, Evgeny Sinelnikov wrote:
>> Полезная штука... Наверное её в girar-utils стоит добавить..
> Туда и пойдёт.
>
>> Нашёл такую странность:
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'git.alt' which can not be resolved as commit?
>> girar-import: Unable to checkout branch `git.alt'
> Er... Что такое git.alt? Первым аргументом надо указывать
> бинарный репозитарий:
>
Тот узел, на котором полагается установлен girar:
$ girar-import --help|grep git.alt
-R,--remote girar server alias, defaults to git.alt
> $ girar-remote acl --list
> sisyphus
> 5.0
> 4.1
> 4.0
>
>> Там, в конце, какой-то странный код.
> В архиве нет ветки "master", есть ветки на каждый бинарный
> репозитарий. "В конце" создаётся ветка master от последнего
> коммита в ветку соответствующего репозитария.
>
Ну, вот она и путаница... Если первый параметр бранч, то откуда мы про
узел узнаем?
--
Sin (Sinelnikov Evgeny)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [devel] I: girar-import - import package from /gears or /srpms
2009-07-17 10:57 ` Evgeny Sinelnikov
@ 2009-07-17 10:58 ` Evgeny Sinelnikov
0 siblings, 0 replies; 10+ messages in thread
From: Evgeny Sinelnikov @ 2009-07-17 10:58 UTC (permalink / raw)
To: ALT Linux Team development discussions
17 июля 2009 г. 14:57 пользователь Evgeny Sinelnikov (sin@altlinux.ru) написал:
> 17 июля 2009 г. 14:44 пользователь Alexey I. Froloff
> (raorn@altlinux.org) написал:
>> On Fri, Jul 17, 2009 at 02:35:22PM +0400, Evgeny Sinelnikov wrote:
>>> Полезная штука... Наверное её в girar-utils стоит добавить..
>> Туда и пойдёт.
>>
>>> Нашёл такую странность:
>>> fatal: git checkout: updating paths is incompatible with switching branches.
>>> Did you intend to checkout 'git.alt' which can not be resolved as commit?
>>> girar-import: Unable to checkout branch `git.alt'
>> Er... Что такое git.alt? Первым аргументом надо указывать
>> бинарный репозитарий:
>>
>
> Тот узел, на котором полагается установлен girar:
> $ girar-import --help|grep git.alt
> -R,--remote girar server alias, defaults to git.alt
>
> Ну, вот она и путаница... Если первый параметр бранч, то откуда мы про
> узел узнаем?
>
Хотя, да... там же параметр указан... Но забавно, что работает... Мне
из кода показалось, что она так и передаётся...
--
Sin (Sinelnikov Evgeny)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [devel] I: girar-import - import package from /gears or /srpms
2009-07-17 10:44 ` Alexey I. Froloff
2009-07-17 10:57 ` Evgeny Sinelnikov
@ 2009-07-17 11:19 ` Terechkov Evgenii
2009-07-17 11:39 ` Slava Semushin
1 sibling, 1 reply; 10+ messages in thread
From: Terechkov Evgenii @ 2009-07-17 11:19 UTC (permalink / raw)
To: ALT Linux Team development discussions
[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]
17.07.2009 Alexey I. Froloff писал:
> On Fri, Jul 17, 2009 at 02:35:22PM +0400, Evgeny Sinelnikov wrote:
> > Полезная штука... Наверное её в girar-utils стоит добавить..
> Туда и пойдёт.
Ждем-с.
> > Нашёл такую странность:
> > fatal: git checkout: updating paths is incompatible with switching branches.
> > Did you intend to checkout 'git.alt' which can not be resolved as commit?
> > girar-import: Unable to checkout branch `git.alt'
> Er... Что такое git.alt? Первым аргументом надо указывать
> бинарный репозитарий:
> $ girar-remote acl --list
> sisyphus
> 5.0
> 4.1
> 4.0
> > Там, в конце, какой-то странный код.
> В архиве нет ветки "master", есть ветки на каждый бинарный
> репозитарий. "В конце" создаётся ветка master от последнего
> коммита в ветку соответствующего репозитария.
Вот поэтому я и написал, что нужны примеры. Не смотря в код понять,
что ему говорить, не получилось :-).
--
С уважением, Терешков
Евгений, ALT Linux
Team
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [devel] I: girar-import - import package from /gears or /srpms
2009-07-17 11:19 ` Terechkov Evgenii
@ 2009-07-17 11:39 ` Slava Semushin
2009-07-19 17:39 ` Alexey I. Froloff
0 siblings, 1 reply; 10+ messages in thread
From: Slava Semushin @ 2009-07-17 11:39 UTC (permalink / raw)
To: ALT Linux Team development discussions
17 июля 2009 г. 18:19 пользователь Terechkov Evgenii
(evg-krsk@yandex.ru) написал:
[...]
> Вот поэтому я и написал, что нужны примеры. Не смотря в код понять,
> что ему говорить, не получилось :-).
+1
Дайте живые примеры того что оно делает и как его вызывать для этого,
иначе не очень понятно нужно ли оно мне, например.
--
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [devel] I: girar-import - import package from /gears or /srpms
2009-07-17 11:39 ` Slava Semushin
@ 2009-07-19 17:39 ` Alexey I. Froloff
0 siblings, 0 replies; 10+ messages in thread
From: Alexey I. Froloff @ 2009-07-19 17:39 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
On Fri, Jul 17, 2009 at 06:39:00PM +0700, Slava Semushin wrote:
> > Вот поэтому я и написал, что нужны примеры. Не смотря в код понять,
> > что ему говорить, не получилось :-).
> Дайте живые примеры того что оно делает и как его вызывать для этого,
> иначе не очень понятно нужно ли оно мне, например.
https://bugzilla.altlinux.org/show_bug.cgi?id=20823
Подписывайтесь, смотрите патчи, комментируйте.
--
Regards,
Sir Raorn.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [devel] I: girar-import - import package from /gears or /srpms
2009-07-17 10:15 [devel] I: girar-import - import package from /gears or /srpms Alexey I. Froloff
2009-07-17 10:35 ` Evgeny Sinelnikov
@ 2009-07-17 10:58 ` Terechkov Evgenii
2009-07-17 11:02 ` Alexey I. Froloff
1 sibling, 1 reply; 10+ messages in thread
From: Terechkov Evgenii @ 2009-07-17 10:58 UTC (permalink / raw)
To: ALT Linux Team development discussions
[-- Attachment #1: Type: text/plain, Size: 548 bytes --]
17.07.2009 Alexey I. Froloff писал:
> Прошу потестировать утилитку. Принимает два аргумента, имя
> бинарного репозитария (girar-acl --list) и имя пакета.
Хорошо бы добавить пример-другой вызова прямо в вывод --help. Ещё было
бы неплохо корректно диагностировать отсутствие
girar-client-sh-functions.
А так работает, полезно. Спасибо.
--
С уважением, Терешков
Евгений, ALT Linux
Team
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-07-19 17:39 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-17 10:15 [devel] I: girar-import - import package from /gears or /srpms Alexey I. Froloff
2009-07-17 10:35 ` Evgeny Sinelnikov
2009-07-17 10:44 ` Alexey I. Froloff
2009-07-17 10:57 ` Evgeny Sinelnikov
2009-07-17 10:58 ` Evgeny Sinelnikov
2009-07-17 11:19 ` Terechkov Evgenii
2009-07-17 11:39 ` Slava Semushin
2009-07-19 17:39 ` Alexey I. Froloff
2009-07-17 10:58 ` Terechkov Evgenii
2009-07-17 11:02 ` Alexey I. Froloff
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