From: Michael Shigorin <mike@osdn.org.ua>
To: sisyphus@altlinux.ru
Subject: [sisyphus] Re: sedna package (дубль 2)
Date: Mon, 23 May 2005 17:51:04 +0300
Message-ID: <20050523145104.GE4681@osdn.org.ua> (raw)
In-Reply-To: <KMEKJEPBHIGAGHJFMEHGGECODDAA.fomichev@ispras.ru>
[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]
On Mon, May 23, 2005 at 06:44:19PM +0400, Andrey Fomichev wrote:
> > > %_libdir/libsedna.a
> > Это лучше в отдельный субпакет (в идеале -- devel-static)
> > > %_includedir/libsedna.h
> > > %_datadir/%name-%version/examples
> > Это лучше в отдельный субпакет (devel)
> А можно я все драйверы положу в sedna-devel?
Эээ... если они могут быть (бес)полезны отдельно, конфликтовать
или ещё как -- то может иметь смысл sedna-drivers или даже
sedna-driver-*, но если они по версиям и надобности синхронны
с основным пакетом -- отколупывать незачем.
Если заметили, строчку между .h и examples я убрал из цитаты.
> И devel-static мне не очень хочется. Ну зачем так много
> пакетов, неудобно же будет. Я думаю, sedna-devel и так
> будет занимать копейки (явно <100Kb).
Ну в него *.a тогда.
> А некоторые примеры, кстати, относятся к драйверам (т.е. для
> разработки), а некоторые просто для того, чтобы Седну
> попробовать, т.е. данные + запросы на XQuery. Думаю их надо
> оставить в sedna, а примеры, относящиеся к драйверам, положить
> в sedna-devel.
Примеры обычно лучше в doc или devel всё же, но дело Ваше.
Тут уже рекомендации со вкусовщиной пошли, а не критические. :)
> > > %changelog
> > > * Mon May 23 2005 Andrey Fomichev <fomichev@ispras.ru>
> > В конце хорошо бы версию ("0.5.6-alt1") -- неплохо добавляет
> > add_changelog из пакета sisyphus (+к нему есть vim macro).
> Удобно. А как пользоваться?
Чем -- add_changelog? Напустить на spec. Макросом?
Положить аттач в ~/.vim/ftplugin, звать \ac.
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
[-- Attachment #2: spec_alt.vim --]
[-- Type: text/plain, Size: 3450 bytes --]
" Plugin to update the %changelog section of RPM spec files
" This is a combination of ideas and code from
" spec.vim by Gustavo Niemeyer <niemeyer@conectiva.com>
" spec_ftplugin.vim by Guillaume Rousse <rousse@ccr.jussieu.fr>
" and Sir Raorn <raorn@altlinux.ru>
" add_changelog utility by Dmitry V. Levin <ldv@altlinux.ru>
" Filename: spec_alt.vim
" Version: 0.0.1
if exists("b:did_altchangelog_ftplugin") | finish | endif
let b:did_altchangelog_ftplugin = 1
if !exists("no_plugin_maps") && !exists("no_spec_maps")
if !hasmapto("<Plug>SpecAltChangelog")
map <buffer> <LocalLeader>ac <Plug>SpecAltChangelog
endif
endif
noremap <buffer> <unique> <script> <Plug>SpecAltChangelog :call <SID>SpecAltChangelog()<CR>
" Useful settings
setlocal makeprg=rpm\ -ba\ %
setlocal errorformat=error:\ line\ %l:\ %m
" Helper functions
function <SID>Date()
let savelang = v:lc_time
execute "language time C"
let date = strftime("%a %b %d %Y")
execute "language time " . savelang
return date
endfunction
if !exists("*s:GetFirstLocation")
" Return location of first line matching
" the given pattern after the given line
" Return -1 if not found at the end of the file
function s:GetFirstLocation(from, pattern)
let linenb = a:from
while (linenb <= line("$"))
let linenb = linenb + 1
let linestr = getline(linenb)
if (linestr =~ a:pattern)
return linenb
endif
endwhile
return -1
endfunction
endif
" Main function
if !exists("*s:SpecAltChangelog")
function s:SpecAltChangelog()
let line = 0
let packager = system("rpm --eval %packager")
" get rid of this !#&* trailing <NL>
let packager = strpart(packager, 0, strlen(packager)-1)
if packager == "%packager"
echomsg "Configuration error: undefined packager"
" Correct? Really exit?
exit
endif
let date = <SID>Date()
let svr = system("rpm -q --qf '%|SERIAL?{%{SERIAL}:}|%{VERSION}-%{RELEASE}\n' --specfile ".expand("%")." |head -1")
let svr = strpart(svr, 0, strlen(svr)-1)
let full = "* ".date." ".packager." ".svr
let chgline = <SID>GetFirstLocation(0, '^%changelog')
if (chgline == -1)
let option = confirm("Can't find %changelog. Create one? ","&End of file\n&Here\n&Cancel",3)
if (option == 1)
call append(line("$"),"")
call append(line("$"),"%changelog")
execute line("$")
let chgline = line(".")
elseif (option == 2)
call append(line("."),"%changelog")
normal j
let chgline = line(".")
endif
endif
if (chgline != -1)
let insert_line = 0
" TODO
" echo "$spec: version \"$oldver\" unchanged, skipping"
" like add_changelog do this
"
" empty line just after chgline may break this
"
" Really compare whole line, or only packager+svr?
" The best variant - do this configurable
if (getline(chgline+1) != full)
call append(chgline, full)
call append(chgline+1,"- ")
call append(chgline+2,"")
let insert_line = chgline+2
else
let line = chgline
if !exists("g:spec_chglog_prepend")
while !(getline(line+2) =~ '^\( *\|\*.*\)$')
let line = line+1
endwhile
endif
call append(line+1,"- ")
let insert_line = line+2
endif
execute insert_line
startinsert!
endif
endfunction
endif
prev parent reply other threads:[~2005-05-23 14:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-23 13:00 [sisyphus] " Andrey Fomichev
2005-05-23 13:39 ` Alexey I. Froloff
2005-05-23 14:28 ` Andrey Fomichev
2005-05-23 16:06 ` Andrey Rahmatullin
2005-05-24 5:53 ` Alexey I. Froloff
2005-05-23 13:54 ` [sisyphus] " Michael Shigorin
2005-05-23 14:44 ` [sisyphus] " Andrey Fomichev
2005-05-23 14:51 ` Michael Shigorin [this message]
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=20050523145104.GE4681@osdn.org.ua \
--to=mike@osdn.org.ua \
--cc=sisyphus@altlinux.ru \
/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 Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git