* [devel] [kojima@conectiva.com.br: Re: [Apt-rpm] meta packages ?]
@ 2001-02-09 14:31 Alexander Bokovoy
0 siblings, 0 replies; only message in thread
From: Alexander Bokovoy @ 2001-02-09 14:31 UTC (permalink / raw)
To: devel
----- Forwarded message from "Alfredo K. Kojima" <kojima@conectiva.com.br> -----
From: "Alfredo K. Kojima" <kojima@conectiva.com.br>
To: "Matilainen Panu (NRC/Helsinki)" <panu.matilainen@nokia.com>
cc: "Hiller, Thomas" <Thomas.Hiller@compaq.com>,
"'apt-rpm@distro.conectiva.com.br'" <apt-rpm@distro.conectiva.com.br>
Subject: Re: [Apt-rpm] meta packages ?
Date: Thu, 8 Feb 2001 14:56:10 -0200 (BRST)
I have this one (quick&dirty) attached.
--
Alfredo
On Thu, 8 Feb 2001, Matilainen Panu (NRC/Helsinki) wrote:
> On Wed, 7 Feb 2001, ext Alfredo K. Kojima wrote:
>
> >
> >
> > We use the same approach as Debian for that, which are task packages.
> > You just make an empty package that contains only a bunbh
> > of Requires for each package you want installed. Then install that task
> > package. You can easily convert a comps file to a set of task packages
> > with some script.
>
> You wouldn't, by any chance, have written such a script? :)
>
> - Panu -
>
> >
> > --
> > Alfredo
> >
> >
> > On Wed, 7 Feb 2001, Hiller, Thomas wrote:
> >
> > > Hi,
> > >
> > > I'm looking for some kind of meta package support in apt-get. I think it
> > > would be nice to have at least some grouping like that from the "comps" file
> > > in RedHat.
> > > Is this possible with apt-get ? What must be done for it ?
> > > Is there a solution for installing with apt-get (from scratch) ? I'm working
> > > on a universal installation server. Do you have some pointers ? I would
> > > really appreciate it, if I can install all my servers from installation
> > > servers and not be bound to kickstart or similiar solutions.
> > >
> > > Thanks.
> > >
> > > Regards,
> > > Thomas
> > >
> > > Thomas Hiller
> > >
> > > COMPAQ Computer Corporation
> > > Global SAP Solution Center
> > > SAP LinuxLab
> > > Altrottstr. 31, D-69190 Walldorf - Germany
> > >
> > > * Phone: ++49/6227/7-45426
> > > * Fax: ++49/6227/7-55426
> > > * Mobil: ++49/172/7282550
> > > *E* mailto: thomas.hiller@compaq.com
> > >
> > > _______________________________________________
> > > Apt-rpm mailing list
> > > Apt-rpm@distro.conectiva.com.br
> > > http://distro.conectiva.com.br/mailman/listinfo/apt-rpm
> > >
> >
> > _______________________________________________
> > Apt-rpm mailing list
> > Apt-rpm@distro.conectiva.com.br
> > http://distro.conectiva.com.br/mailman/listinfo/apt-rpm
> >
>
> --
>
#!/usr/bin/python
import time
import sys
from string import *
nl="\n"
def nameToTName(name):
name = lower(strip(name))
name = replace(name, " ", "_")
name = replace(name, "/", "_")
return name
def taskalize(arch, version, name, packages):
fname = "task--"+nameToTName(name)+".spec"
f = open(fname, "w+")
f.write("Summary: Metapackage for "+name+nl)
f.write("Name: task--"+nameToTName(name)+nl)
f.write("Version: "+version+nl)
f.write("Release: 1"+nl)
f.write("License: to kill"+nl)
f.write("Group: Tasks"+nl)
for p in packages:
if p[0]=="@":
f.write("Requires: task--"+nameToTName(p[1:])+nl)
else:
tok = split(p)
if len(tok) == 2:
if (tok[0]=="!" and tok[0]!=arch) or \
(tok[0]!="!" and tok[0]==arch):
f.write("Requires: "+strip(tok[1])+nl)
else:
f.write("Requires: "+p+nl)
f.write("BuildArch: "+arch+nl)
f.write("BuildRoot: %{_tmppath}/%{name}-%{version}-root"+nl)
f.write(nl+"%description"+nl)
f.write("Auto-generated meta package to install things for "+name+"."+nl)
f.write(nl+"%files"+nl)
f.close()
print "Created", fname
def taskalizeFile(file, arch, version):
try:
f = open(file, "r")
except:
print "comps file",file,"could not be opened."
sys.exit(1)
while 1:
# garbage
line = f.readline()
if not line:
break
line = strip(line[:-1])
if not line:
continue
if line[-1]!="{":
continue
tokens = split(strip(line[1:-1]))
if tokens[0][:2]=="--":
del tokens[0]
name = join(tokens)
pl = []
while 1:
line = f.readline()
if not line:
print "ERROR: File ended with incomplete data"
sys.exit(1)
line=line[:-1]
if line=="}":
break
pl.append(strip(line))
taskalize(arch, version, name, pl)
f.close()
t=time.localtime(time.time())
y=`t[0]`
m=`t[1]`
if len(m)==1:
m="0"+m
d=`t[2]`
if len(d)==1:
d="0"+d
version=y+m+d
taskalizeFile(sys.argv[1], "i386", version)
print "Use rpm -ba <filename.spec> to create the packages"
----- End forwarded message -----
--
Sincerely yours, Alexander Bokovoy
The Midgard Project | www.midgard-project.org | Aurora R&D team
Minsk Linux Users Group | www.minsk-lug.net | www.aurora-linux.com
IPLabs Linux Team | linux.iplabs.ru | Architecte Open Source
-- Whoever would lie usefully should lie seldom.
_______________________________________________
Devel mailing list
Devel@linux.iplabs.ru
http://www.logic.ru/mailman/listinfo/devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-02-09 14:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-09 14:31 [devel] [kojima@conectiva.com.br: Re: [Apt-rpm] meta packages ?] Alexander Bokovoy
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