Re: [Gnewsense-dev] Debderiver: _do2, print, length
Stayvoid wrote: diff6_2vsorig.txt replaces _do (and removes it) with _do2 and renames _do2 to _do. Excellent patch. Tested and merged. ___ gNewSense-dev mailing list gNewSense-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
Re: [Gnewsense-dev] Debderiver: _do2, print, length
On Mon, 12 Mar 2012 05:55:22 +0300 Stayvoid stayv...@gmail.com wrote: Most likely your reprepro version is too old. I'm currently using 4.2.0. Should I install 4.9.0-1 from git? diff6_2vsorig.txt replaces _do (and removes it) with _do2 and renames _do2 to _do. 4.8 is in backports (should be at least). thanks, kk -- Karl Goetz, (Kamping_Kaiser / VK7FOSS) http://www.kgoetz.id.au No, I won't join your social networking group *** I've changed GPG key to 6C097260 *** signature.asc Description: PGP signature ___ gNewSense-dev mailing list gNewSense-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
Re: [Gnewsense-dev] Debderiver: _do2, print, length
Karl, 4.8 is in backports (should be at least). I've never used backports. There is a Debian howto, but I don't think it's the one I'm looking for. Could you tell me how to use backports on a gns system? ___ gNewSense-dev mailing list gNewSense-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
Re: [Gnewsense-dev] Debderiver: purging
Sam, It should do the same for supplementary suites. It's pretty much the same code, with a different codename... According to your pseudocode example, it should be something like this: for suppl_suite in dist.suppl_suites: command = ['-T', 'dsc', 'listfilter', dist.codename, '($Source (==' + suppl_suite.codename + '), $Version (% *' + self._op_sys.name.lower() + '*))'] But I'm not sure. The whole picture is missing from me. I understand the small parts, but I can't make them work together. Could you split this task to several subtasks? ___ gNewSense-dev mailing list gNewSense-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
Re: [Gnewsense-dev] Debderiver: _do2, print, length
Stayvoid wrote: diff6vsorig.txt replaces _do with _do2 and removes \ I only took the backslash removal. See below. diff7vsorig.txt removes print (again) diff8vsorig.txt fixes length Both merged. I have no idea why subprocess.Popen(['reprepro', '--noskipold', '-Vb', '/srv/backuppc/repo/debderiver/base', 'processincoming all']) doesn't work. ['processincoming', 'all'] works. It took me a while to understand this, but I still don't understand the cause of the problem. os.system passes the command string straight to the shell. subprocess.Popen is a bit more intelligent: it knows about parameters. More specifically, each list item is a positional parameter in the shell. E.g. the difference between: subprocess.Popen(['grep', 'bash', '/etc/passwd']) = grep bash /etc/passwd subprocess.Popen(['grep', 'bash /etc/passwd']) = grep 'bash /etc/passwd' Also note the example [1] in Python documentation. So your change for update and processincoming is correct. The one for include still uses a single string, which is valid, but it's cleaner and more consistent to pass a list. The one for removesrc uses ' '.join(...).split(), which are reverse operations of each other. BTW, both files (orig and sixth ver) output this: Error parsing /srv/backuppc/repo/debderiver/base/conf/updates, line 1: Unknown header 'FilterSrcList'! To ignore unknown fields use --ignore=unknownfield There have been errors! I have no time to investigate this, but AFAICT it's only connected with updates. Most likely your reprepro version is too old. [1] http://docs.python.org/library/subprocess.html#subprocess.Popen ___ gNewSense-dev mailing list gNewSense-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
Re: [Gnewsense-dev] Debderiver: purging
(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/ ___ gNewSense-dev mailing list gNewSense-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
Re: [Gnewsense-dev] Debderiver
Karl Goetz wrote: Everyone but this project is reinventing the wheel: http://ftp-master.debian.org/#dak http://wiki.debian.org/DakHowTo ;) If it had some documentation I wouldn't need to do all this reinventing, now would I? ;) As far as I could see it's meant for a repository from scratch, not for a copy plus minor modifications. I should take a closer look at its source code. I'm not a big fan of the RDBMS dependency, though. ___ gNewSense-dev mailing list gNewSense-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
Re: [Gnewsense-dev] Debderiver
On Sat, 17 Dec 2011 23:57:05 +0100 Sam Geeraerts sam...@elmundolibre.be wrote: Hi, To replace the current metad tool [1] we use to set up the gNewSense 3 repositories I've been hacking on a Python script [2] to do the same. Currently, it can only set up a reprepro environment (with FilterLists) and reprepro update for multiple releases and suites. Congrats. Future features: - include self-built packages (processincoming); - include third-party repositories (after debmirror; include{deb,udeb,dsc} Building packages from source is not planned for the short term, but is certainly an interesting feature to have. Comments/patches welcome. If I missed something and it turns out I'm re-inventing the wheel, please let me know. [1] http://bzr.savannah.gnu.org/lh/gnewsense/metad/files [2] http://bzr.savannah.gnu.org/lh/gnewsense/debderiver/files/ Everyone but this project is reinventing the wheel: http://ftp-master.debian.org/#dak http://wiki.debian.org/DakHowTo ;) thanks, kk -- Karl Goetz, (Kamping_Kaiser / VK7FOSS) http://www.kgoetz.id.au No, I won't join your social networking group signature.asc Description: PGP signature ___ gNewSense-dev mailing list gNewSense-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/gnewsense-dev