test-bug-734922-apt-showsrc-duplicate 624 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'i386'
  7. # foo is identical, show it only once in showsrc
  8. insertpackage "unstable" "foo" "i386" "1.0"
  9. insertpackage "testing" "foo" "i386" "1.0"
  10. insertsource "unstable" "foo" "i386" "1.0"
  11. insertsource "testing" "foo" "i386" "1.0"
  12. # bar is different, show twice
  13. insertsource "unstable" "bar" "i386" "1.0"
  14. insertsource "testing" "bar" "i386" "2.0"
  15. setupaptarchive
  16. # ensure "foo" is not shown twice
  17. aptcache showsrc foo bar|grep ^Package: > out.txt
  18. testequal "Package: foo
  19. Package: bar
  20. Package: bar" cat out.txt