- Package:
- cowbuilder
- Source:
- cowdancer
- Description:
- pbuilder running on cowdancer
- Submitter:
- Russ Allbery
- Date:
- 2017-11-04 22:06:03 UTC
- Severity:
- normal
The cowbuilder man page claims to support an execute operation, but I cannot figure out how to pass in the command and there's no example. I tried all of: $ cowbuilder execute apt update --basepath /var/cache/pbuilder/base-experimental.cow $ cowbuilder --execute --basepath /var/cache/pbuilder/base-experimental.cow apt update $ cowbuilder --execute 'apt update' --basepath /var/cache/pbuilder/base-experimental.cow $ cowbuilder --execute --basepath /var/cache/pbuilder/base-experimental.cow $ cowbuilder --execute --basepath /var/cache/pbuilder/base-experimental.cow 'apt update' $ cowbuilder --execute --basepath /var/cache/pbuilder/base-experimental.cow -- apt update and none of them worked. Could you let me know what I'm missing and add an example or some more documentation to the cowbuilder man page?
Assuming that it is like pbuilder, what 'execute' does is getting an executable (be it binary or script), copy it inside the chroot, and execute it.
Mattia Rizzolo dixit:
Most cowbuilder commands just call the corresponding pbuilder one.
This *is* badly documented in cowbuilder, admittedly.
So Russ probably wants this:
echo apt update | cowbuilder \
--basepath /var/cache/pbuilder/base-experimental.cow \
--login --save-after-login
In this specific case, though:
cowbuilder --basepath /var/cache/pbuilder/base-experimental.cow --update
bye,
//mirabilos
Thorsten Glaser <tg@mirbsd.de> writes: Where do you pass the name of the executable, though? I never got an error message that seemed to indicate I had successfully done such a thing. Either cowbuilder reported that I didn't pass in a valid argument for --execute or it produced an error saying that the argument I did pass in was an invalid argument. Oh, I had forgotten about --save-after-login. Thank you! I was debugging why the chroot failed to update with an obscure apt error and was trying to incrementally update some of the packages, which is why I was going down the path of trying to run commands with preserved results instead of just using --update. Thanks! --save-after-login was the real solution to my problem, but I suspect that --execute doesn't really work with the cowbuilder wrapper (or I missed some iteration of call sequence to try).