"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/integration/test-apt-cli-json-hooks" between
apt-2.2.3.tar.gz and apt-2.2.4.tar.gz

About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.

test-apt-cli-json-hooks  (apt-2.2.3):test-apt-cli-json-hooks  (apt-2.2.4)
skipping to change at line 24 skipping to change at line 24
. .
and paragraphs and everything." and paragraphs and everything."
insertpackage 'testing' 'bar' 'i386' '2.0' '' '' "$DESCR2" insertpackage 'testing' 'bar' 'i386' '2.0' '' '' "$DESCR2"
setupaptarchive setupaptarchive
APTARCHIVE="$(readlink -f ./aptarchive)" APTARCHIVE="$(readlink -f ./aptarchive)"
cat >> json-hook.sh << EOF cat >> json-hook.sh << EOF
#!/bin/bash #!/bin/bash
trap '' SIGPIPE
while true; do while true; do
read request <&\$APT_HOOK_SOCKET read request <&\$APT_HOOK_SOCKET || exit 1
read empty <&\$APT_HOOK_SOCKET
if echo "\$request" | grep -q ".hello"; then if echo "\$request" | grep -q ".hello"; then
echo "HOOK: HELLO" echo "HOOK: HELLO"
printf '{"jsonrpc": "2.0", "result": {"version": "0.1"}, "id": 0} \n\n' >&\$APT_HOOK_SOCKET
fi fi
if echo "\$request" | grep -q ".bye"; then if echo "\$request" | grep -q ".bye"; then
echo "HOOK: BYE" echo "HOOK: BYE"
exit 0; exit 0;
fi fi
echo HOOK: request \$request echo HOOK: request \$request
read empty <&\$APT_HOOK_SOCKET || exit 1
echo HOOK: empty \$empty echo HOOK: empty \$empty
if echo "\$request" | grep -q ".hello"; then
printf '{"jsonrpc": "2.0", "result": {"version": "0.1"}, "id": 0}
\n\n' >&\$APT_HOOK_SOCKET 2>/dev/null || exit 1
done done
chmod +x json-hook.sh chmod +x json-hook.sh
HOOK="$(readlink -f ./json-hook.sh)" HOOK="$(readlink -f ./json-hook.sh)"
# Setup all hooks # Setup all hooks
cat >> rootdir/etc/apt/apt.conf.d/99-json-hooks << EOF cat >> rootdir/etc/apt/apt.conf.d/99-json-hooks << EOF
AptCli::Hooks::Install:: "$HOOK"; AptCli::Hooks::Install:: "$HOOK";
 End of changes. 5 change blocks. 
3 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)