Editing Device management using Bcfg2
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 369: | Line 369: | ||
We need to write a "APTlite" client driver. Probably modifying an simple existing driver like <code>FreeBSDPackage.py</code> would do. Some notes about the task: | We need to write a "APTlite" client driver. Probably modifying an simple existing driver like <code>FreeBSDPackage.py</code> would do. Some notes about the task: | ||
- | * | + | * RefreshPackages needs to be modified to include only packages received from server and ignore the rest. Looks like following piece of code generates the list we need |
desired = [entry.get('name') for struct in self.config for entry in struct if entry.tag == 'Package'] | desired = [entry.get('name') for struct in self.config for entry in struct if entry.tag == 'Package'] | ||
- | * Then, we could run something like this for each pkg in desired list | + | * Then, we could run something like this for each pkg in desired list: |
/usr/bin/dpkg-query -W --showformat='${Version}\t${Status}\n' <pkg> | /usr/bin/dpkg-query -W --showformat='${Version}\t${Status}\n' <pkg> | ||
- | * | + | * Package verification (VerifyPackage) needs probably to be made even more liberal, like returning true if entry.attrib['version'] is 'auto' or 'any' |
* <code>pkgtool</code> could probably be copied from <code>APT.py</code> | * <code>pkgtool</code> could probably be copied from <code>APT.py</code> |
Learn more about Contributing to the wiki.