ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Алексей Шенцев" <ashen@nsrz.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] что за явление
Date: Thu, 3 Jul 2008 10:13:58 +0400
Message-ID: <200807031013.59029.ashen@nsrz.ru> (raw)
In-Reply-To: <d77783290807022302h6c369026i6f2fc1626caaba8f@mail.gmail.com>

В сообщении от Thursday 03 July 2008 10:02:51 Денис Черносов написал(а):
> А вообще хотелось бы узнать, можно ли (хотя бы в теории) собрать
> репозиторий из рабочей системы. Т.е. дать команду и указать папку и всё,
> что есть в rpm -qa, получить в виде папки с rpm-пакетами? С поправкой на
> то, что некоторые конфиги уже будут не умолчальными... Меня бы такой
> функционал очень даже заинтересовал бы...
Можно. Вот здесь описанно как:
http://freesource.info/wiki/DmitriyKruglikov/Repository?v=f2g&search=repo
Единственное, что я добавлю (как я делал):
1) apt-cache autoclean  - удалял из /var/cache/apt/archives/ все пакеты, 
имеющие одинаковые названия, но различающиеся версией-релизом.
2) докачивал недостающие пакеты вот таким скриптом:

#!/bin/sh
apt-get autoclean
apt-get update
rpm -qa --qf='%{NAME}\n' | sort > /tmp/installrpm
cat /tmp/installrpm | while read PKG; do
       apt-get reinstall -d -y $PKG
       done
#EOF

3) ну а потом уже всё по указанной выше статье.

Скрипт конечно неидеален. Очень медленно работает из-за того, что для каждого 
установленного в системе пакета происходит вызов apt-get reinstall -d -y, да 
же если пакет присутствует в /var/cache/apt/archives/ и он не качается, всё 
равно происходит вызов apt-get'а. А в любой системе, языке программирования, 
самая долгая операция - вызов подпрограммы. Если сможете улучшить этот 
скрипт, многие это поприветствуют.
-- 
С уважением Шенцев Алексей Владимирович.
E-mail: ashen@nsrz.ru
XMPP: ashen@altlinux.org, AlexShen@jabber.ru
ICQ: 271053845

  parent reply	other threads:[~2008-07-03  6:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01 13:20 Геннадий Ищенко
2008-07-01 13:32 ` Андрей Черепанов
2008-07-02 20:24   ` Michael Shigorin
2008-07-03  2:07   ` Геннадий Ищенко
2008-07-03  5:06     ` Хихин Руслан
2008-07-03  6:13         ` Алексей Шенцев [this message]
2008-07-03  6:28           ` Алексей Шенцев
2008-07-03  7:12             ` Алексей Шенцев
2008-07-03  7:14             ` Dmitriy Kruglikov
2008-07-03  8:10             ` Хихин Руслан
2008-07-03  7:51         ` Alexey Novikov
2008-07-03 10:19             ` Alexey I. Froloff
2008-07-03 13:09       ` Геннадий Ищенко
2008-07-03 13:18         ` Хихин Руслан
2008-07-03 13:47         ` Алексей Шенцев

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=200807031013.59029.ashen@nsrz.ru \
    --to=ashen@nsrz.ru \
    --cc=community@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 Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

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


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