gnewsense-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnewsense-dev] Debderiver: purging


From: Sam Geeraerts
Subject: Re: [Gnewsense-dev] Debderiver: purging
Date: Tue, 06 Mar 2012 23:35:04 +0100
User-agent: Thunderbird 2.0.0.24 (X11/20101029)

(Subject was getting a bit long in the tooth; specified.)

Stayvoid wrote:
You're on the right track. The class needs a purge_list. Some hints:

- in _purge_purge_lists you should loop over the supplementary suites;
I've got stuck again. I need more information.

First some background info: look up "distribution" and "suite" in the Debian glossary [1]. Reprepro considers each suite separately. Debderiver ties "subsuites" a.k.a. "supplementary suites" (e.g. parkes-security) to a "main suite" a.k.a. "distribution" (e.g. parkes).

Should it loop over dist.suppl_suites?

Yes.

What should it do with those? Could you provide an example in pseudocode?

Currently, _purge_purge_lists loops over all packages that should be excluded (for each distribution), checks whether there's a gNS version of it (which we want to keep) and, if not, delete the package.

It should do the same for supplementary suites. It's pretty much the same code, with a different codename, so:

for dist...:
    for src_pkg...:
    ... # existing code
    for every supplementar suite:
        # Check....
        command = ...codename...
        if not...:
            self._do...

Could you show me the output of _do2? I've read some docs on
subprocess, but it's unclear to me.

subprocess.Popen runs a shell command. _do2 just returns what reprepro would output to the shell when you run the command, e.g.:

$ reprepro -b base/ -T dsc listfilter parkes '($Source (==apt))'
parkes|main|source: apt 0.8.10.3+squeeze1

What is the purpose of ($Source (==iceweasel), $Version (%
*gnewsense*)) (_purge_purge_lists function)? This syntax looks
strange. I suppose it has something to do with the execution of
reprepro, but I'm not sure.

Read reprepro's man page. The listfilter subcommand lists all packages that satisfy the conditions: source package name equals iceweasel, version contains 'gnewsense'.

# TODO: add pocket name for supplementary suites (short term).
# TODO: give each suite its own description (long term).
# TODO: replace this function with _do2, i.e. use subprocess instead of
# os.system.
Could you comment on these TODOs?
What is the "pocket name"?

It's the second part of the suite name, e.g. 'security' for parkes-security. Check Ubuntu's glossary (URL in README).

What does "description" mean?

Check the Description fields in distribution Release files (e.g. below [2]) and conf/distributions in reprepro's man page. Currently, debderiver gives all suites the same description, the top level one in the config file. Distributions and suites should have their own descriptions (either independent from the top level one, or as a suffix to the parent level, e.g. os -> 'gNewSense', dist -> 'Parkes', suite -> 'security updates').

Should I replace every _do call with _do2 or it will be enough to
replace os.system with subprocess in _do?

Replace _do with _do2.

[1] http://wiki.debian.org/Glossary
[2] http://ftp.debian.org/debian/dists/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]